You may have seem my post a little earlier, where my form had no veiwstate and was not posting any data back. I seemed to have that working now, but now there is a new problem.
I cannot read the submitted values...
Just to summarise, my form is in a nested user control. One that is 'loaded' by another user control , that is in turn, loaded by a base class. Something like that anyway.
I have put the following code in the Page.Load function of the user control with the form.
if (Page.IsPostBack)
{
temp = Request.Form.ToString();
strAmount = Request.Form["txtAmount"].ToString();
etc etc...
When I use the degugger to see the value of 'temp', this is what I see.. (Only the first part is shown here as it is a quite a long form)
"__VIEWSTATE=dDwtMTI3OTMzNDM4NDs7PrggHXYdc%2bfYaBGqGEob%2fwbeSdup&_ctl5%3a_ctl0%3a_ctl0%3atxtAmount=234& etc etc...
See the bit there 'txtAmount=234'? Thats the value I want... But the line...
strAmount = Request.Form["txtAmount"].ToString();
.. returns this error.
System.NullReferenceException: Object reference not set to an instance of an object.
Please help. I am at my wits end with this.