The if( Page.IsPostback ) construct is the correct way to test if this is a
postback request; Its just that your code which generates the post to the
server is in some question. Having said that, as I have not done this, so I
cant comment on the vailidy of your approach other than one must have to
trick ( if possible ) ASP.NET into a normal mode of operation which would
make it think that this is postback and not the first GET.
As far as the code which your javscript passes to the receiving aspx page,
have you tried this manually ( IE Creating the URL on notepad or something
and pasting it into the browser address bar ). Dont forget to put the '?'
after the basic URL before your query string. Alternatively, there may be
some character stripping going on if this is going though a gateway or
something???!??!??!?!
Let me know how you are getting on, as I find this topic interesting .
Regards Mr N . . . .
"milkyway" <d0******@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Thanks for the pointer. Is there a correct way to write code on the
server side whenever a POST is being done from the client in C#? I
thought that one was to use the page_load somehow.
Also, when I am sending the string, it is in the form of:
TableName=FDepents&FDepents11=600&FDepents12=609 ....
I have now seen (through the debugger), that the following code:
string firstName =
(string)Request.QueryString.Get("TableName");
Just returns a null, even though in the part of the code
alert("about to post the data");
httpRequest.send(dataToPost); <--- HERE
return httpRequest;
Clearly has the parameters being passed in..
Sigh - will wonders ever cease