Posted on: 7/19/2014 6:23:42 PM | Views : 431


I've reduce the trouble I've been having to the following example;  I would expect this code display a label saying 'Good Morning' as well as a button which, when clicked, will display a message box also saying 'Good Morning' which it gets from the text property of the label...
Instead I get; "Object reference not set to an instance of an object." when I try to open the page.
<body> <script language="javascript" type="text/javascript"> function checkStatusChange() { var myAction = document.getElementById('<%=fv1.FindControl("lbl1").ClientID %>').value; alert(myAction); return true; } </script> <form id="form1" runat="server"> <asp:Button ID="btn1" runat="server" Text="Button" OnClientClick="checkStatusChange();" /> ...

Go to the complete details ...