I have the following sitituation:
aspx: form with
<asp:Label id="txtMoveTo" Font-Name="Arial"
Font-Size="8pt" runat="server"
EnableViewState="True" Text=" " />
The value is set via javascript based on other selections on the form.
Now I need to request this value in code-behind.
str1=Request.Form["txtMoveTo"].Trim();
Get the following error:
System.NullReferenceException: Object reference not set to an instance of an object
If I remove the trim, str1 is null ...
Pls advise
aspx: form with
<asp:Label id="txtMoveTo" Font-Name="Arial"
Font-Size="8pt" runat="server"
EnableViewState="True" Text=" " />
The value is set via javascript based on other selections on the form.
Now I need to request this value in code-behind.
str1=Request.Form["txtMoveTo"].Trim();
Get the following error:
System.NullReferenceException: Object reference not set to an instance of an object
If I remove the trim, str1 is null ...
Pls advise