.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to get value from HtmlInputFile object created on Runtime(on Pageload) ?

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net

I create File Objects on runtime depending on user. 
After creating them on Pageload, after selecting file paths for all File object, when I try to read it on ButtonClick event by calling this function:
FindAllFileCtrls(Page); All values File objects are null.
Just a doubt I'm using MasterFilePage ref for this page. So is it some kind of Parent & Child page reference issue?

I'm not able to go beyond this if (hif != null)

protected void FindAllFileCtrls(Control

View Complete Post

More Related Resource Links

Microsoft JScript runtime error: 'Parent' is null or not an object


Hi friends,

        I got This Error : Microsoft JScript runtime error: 'Parent' is null or not an object

 In runtime,after  click on the check box, It Show "Microsoft JScript runtime error: 'Parent' is null or not an object"

<script language ="javascript" type ="text/javascript" >
        function SelectAllCheckboxesSpecific(spanChk)
           var IsChecked = spanChk.checked;
           var items=0;
           var Chk = spanChk;
              Parent = document.getElementById('gvUsers');          
              var items = Parent.getElementsByTagName('input');                         
              for(var i=0;i<items.length;i++)
                  if(items[i].id != Chk && items[i].type=="checkbox")
                      if(items[i].checked!= IsChecked)

please verify it. 

Can't Load 32-bit Com Object into managed code (C#) in runtime with 64-bit Enviroment

Hey everyoneI need your help with some 64-bit issues. I recently had to migrate my work to a 64-bit enviroment.  I'm using VS 2005.I have a simple c# application that is using an unmanaged c++ Com object. both are 32-bit applicationsBoth projects compile smoothly, and when i register my com object it succeeds. However, during runtime when i try to create an instance of the com class: 'someComClass a = new someComClass()' I get the error:COMException : Retrieving the COM class factory for component with CLSID {XXXXXXXXX} failed due to the following error: 80040154OK people, bring it on, what's wrong ? how do i fix it ? registery issues ? compiler issues ?Any help is welcomedWith thanksOded

The Assembly was created in Runtime v1.1.4322 and cannot be loaded while runtime 4.0 without additio

Hello! Note: The text above was translated into English. I experience this problem when adding DirectX references and usings to a Form in Visual Studio 10 Professional, Trial Version. The dlls (Microsoft.DirectX; Microsoft.DirectX.Direct3D) are included from X:\Windows\Microsoft.Net\DirectX for Managed Code\1.0.2902.0\. I really like to begin coding DirectX. Do you know what this Message means? What shall I do?   Many thanks, Regards

Getting checked value of a checkbox created at runtime c#

Getting checked value of a checkbox created at runtime c# I use visual studio 2008, and vc# in my program i create a series of controls, inlcuding checkboxs inside an arraylist, with i=0 and increment with each control: this.arylTxtGEItems.Add(new System.Windows.Forms.CheckBox()); ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).Location = new System.Drawing.Point( groupBoxParametros.Location.X + 20 + (c * (w + 20)), groupBoxParametros.Location.Y + 45 + (r * (h + 16))); ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).Name = "CheckBox_" + i.ToString(); ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).Size = new System.Drawing.Size(128, 21); ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).TabIndex = j + 2; ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).Text = "&All"; ((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i]).Checked = true; this.Controls.Add(((System.Windows.Forms.CheckBox)this.arylTxtGEItems[i++])); It works good, i can see my controls and use them :) The problem is that i dont know how to access a control that i created this way, for example the name of the first checkbox, is "CheckBox_0" how do i get the value of "CheckBox_0".Checked? Thank you for your help saludos rubenc  

How to get Checkbox value created at runtime above gridview header


I have creted a checkbox for each column of grid at the top of the header in row created event. I need to check wheather checkbox is checked after button click event.

//Build custom header.

                GridView oGridView = (GridView)sender;
                GridViewRow oGridViewRow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert);
                TableCell oTableCell = new TableCell();

                //Add Staff_ID
                CheckBox chkStaffID = new CheckBox();
                chkStaffID.ID = "chkStaff_ID";
                chkStaffID.Text = "Hide";
                chkStaffID.CheckedChanged += new System.EventHandler(chkStaffID_CheckedChanged);

Runtime Error after Overriding Object.Equals(Object)


Hello All,

Please consider my class TargetInfo:

class TargetInfo: IComparable<TargetInfo>, IEquatable<TargetInfo>, INotifyPropertyChanged
   // ...
   public string TargetId { ... }
   public string Name { ... }
   public string AlternateName { ...}

   public override bool Equals(object obj)
      return TargetId == ((TargetInfo)obj).TargetId;

MSDN states that if IEquatable<> is implemented, Object.Equals(Object) should be overriden (Object.GetHashTable() should be too). As seen above, I have done this.

At runtime, in my overriden Object.Equals(Object), I get an exception with this text: "Unable to cast object of type 'MS.Internal.NamedObject' to type 'TargetInfo'."

What is the problem with my implementation?



Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object referen



 i have a dropdownlist and Datagrid control on form. i wanted to refresh the grid

on changing  the DropDown OnSelectedIndexChanged, but when i do change

the dropdown value then it give me fallowing error message.

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Can any one help me, how to solve this problem?

Code given below.


                <asp:DropDownList ID="ddColor" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddColor_SelectedIndexChanged"
                    <asp:ListItem Selected="True">Red</asp:ListItem>

jquery runtime error: Microsoft JScript runtime error: 'nodeName' is null or not an object


Microsoft JScript runtime error: 'nodeName' is null or not an object

in jquery-1.4.2.min.js 

How could Transfer a simple object that is created in asp.net to java script code and worked with it


Hi Experts.

I have a simple call in asp.net code behind. There are two variable i, j and some methods in . Like:

Class Test()

{              int i; string str;

                Public getI(int){//.}

Public getJ(int){//.}


Is there any way to have the same class in javascript? I want to create a simple object form this class and initiated its variables and passed it to javascript code and worked with it? How can I do it?


SPWebApplicationBuilder and modifying the created SPApplicationPool object



I was trying to create a web application using the SPWebApplicationBuilder class. It seemed to work fine, no errors and the web app was created, the app pool was there and I could create a root site collection. But then I ran into problems. I recieved a 500 internal server error and I searched the sp logs and event logs but nothing :(

As it turns out the application pool that the SPWebApplicationBuilder created had the "Enable 32-bit Applications" set to true. After manually setting this to false the site started just fine.

So my question is; how do I set this property when using the SPWebApplicationBuilder class? There is a Properties property on the SPApplicationPool object, however I have not found much documentation on this so I have no idea if this is where to set this.

Any idea?

Also as this code might run on both 32bit and 64bit installs of SharePoint, is there a way to check what architecture SharePoint is installed as...


Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object



I have one text box and that textbox should contain firstname.lastname.

I am doing Client side validation.

I am getting error Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object.

ASPX code :-

function validateTextBox(str)
         alert(str);// Getting proper value
        if (str.indexOf(".") == -1)
                alert("Username should have period(.) between firstName and LastName like FirstName.LastName or FirstNameMI.LastName");
               // Here i am getting error...
                return false;

How to send any collection object from .NET Application to object variable created in SSIS Package


HI All,

I have a question regarding SSIS -- How to send list object from .NET Application to object variable created in SSIS Package. In List object there are one lack records stored..This list object needs to be passed to SSIS Package. Please reply me back with any suggestion/solutions ...Required ASAP.

Waiting for your replies.





Microsoft JScript runtime error: Object doesn't support this property or method



When I am updating dropdown of parent window from popup it shows error JScript runtime error. But I can able to clear the dropdown. When I am adding only the problem is occuring. I have pasted the code below

var ddlVendor = window.opener.aspnetForm.document.getElementById('ctl00_DefaultContent_ddlVendor');

//Clears the state combo box contents.

for (var count = ddlVendor.options.length-1; count >-1; count--)


ddlVendor.options[count] =


var stateNodes = listNode.getElementsByTagName('Table1/UserName');

var stateIds = listNode.getElementsByTagName('Table1/Password');

Microsoft JScript runtime error: Object required


have code

and i m getting an error( mentioned in title ) on line

browserdetect = textcontainerobj.filters ? "ie" : typeof textcontainerobj.style.MozOpacity == "string" ? "mozilla" : ""

please help 


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GFLN - Global Freight & Logistics Network</title>
<!--[if IE 6]>
<script type="text/javascript" src="js/DD_belatedPNG.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css"/>
<!-- for left menu-->
<script type="text/javascript">

    var baseopacity = 0

    function showtext(thetext) {
        if (!document.getE

Dynamic controls added at runtime, threading, The calling thread cannot access this object because a




My problem is on load I initialise a new thread. This thread create a new control then tries to add the control to a stackapnel and the error I receive is -

The calling thread cannot access this object because a different thread owns it.

Heres is my code e-




t = new

Using IPC only channel getting Unable to cast object of type 'System.Runtime.Remoting.Identity' to


I have a remoting application that is using delegates to preform callbacks between processes. I found that if I don't use a TCP channel at all and only initialize an IPC channel that the callback delegates start throwing the following error after about a minute has passed.

From what little I could find on Google it seems to be a Lifetime Service management issue but all the classes that the delegates belong to return null from InitializeLifetimeService which should give the object an infinite lifetime.

With the TCP channel initialized the issue doesn't happen, but I would like it to use the IPC channel if all of the processes are on the local box.


Type:        System.InvalidCastException
Message:    Unable to cast object of type 'System.Runtime.Remoting.Identity' to type 'System.Runtime.Remoting.ServerIdentity'.
Stack Trace:   
Server stack trace:
   at System.Runtime.Remoting.RemotingServices.GetServerTypeForUri(String URI)
   at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)


Object ref not set error on created instance.


First time I do it this way, so probably something simple I don't know about.  Think the following code explain the "issue" better than I could.

  public class MvcApplication : HttpApplication
    private ILoggerService _loggerService;
    protected void Application_Start()
      _loggerService = ObjectFactory.GetInstance<ILoggerService>();
      _loggerService.Info("Application Started");

    public void Application_End()
      _loggerService.Info("Application Ended.");

    protected void Application_Error(object sender, EventArgs e)
      // get object ref not set error if I dont do this??
      _loggerService = ObjectFactory.GetInstance<ILoggerService>();  

      _loggerService.Error("Error Occured");

Basically, if I leave out the _logService instantiation in Application_Error, I get an object reference not set error.

However it work fine in Application_End.

While I'm at it (know I should start a seperate thread).  Any good article to log application errors in Application_Error?  (I want to keep the logger out of "catch" blocks" in my classes.)   

the following does not work out so well for me (Server.LastError are

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend