By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,550 Members | 2,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,550 IT Pros & Developers. It's quick & easy.

Where have the form values gone

P: n/a
Hi,

We are developing a web application in asp.net and all of a sudden there is
this new requirement and I am having problems to implement it.

My problem is that when a regular html page posts values to a aspx page in
our website, I lose the values that were posted. If the values are send with
a GET request I can access them in the Request collection.

Does anyone have an idea why this happens and what I can do to solve this.

Regards,
Cyrus Donders
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Cyrus,

From your message i can understand that you are trying to post the data from
an HTML page to an ASPX page
and in ASPX page you are tyring to access those values.

when you submit by post [POST method] in your ASPX page your should have
code something like this.

string strTextBox = Request.Form("TextBox1");

if you use GET method then it should be

string strTextBox = Request.QueryString("TextBox1");

Since your are passing the values in the Querystring your code is
working..in post method it does not append the keyvalue pairs
in the url and hence they are not working for post method.

Hope this helps.

Thanks
Raghavendra
"Cyrus Donders" <c.*******@vspaa.nl> wrote in message
news:u6**************@TK2MSFTNGP09.phx.gbl...
Hi,

We are developing a web application in asp.net and all of a sudden there is this new requirement and I am having problems to implement it.

My problem is that when a regular html page posts values to a aspx page in
our website, I lose the values that were posted. If the values are send with a GET request I can access them in the Request collection.

Does anyone have an idea why this happens and what I can do to solve this.

Regards,
Cyrus Donders

Nov 18 '05 #2

P: n/a
Hi Raghavendra T V

I just read your reply.

I think that you haven't tried to do what you are suggesting.

string strTextBox = Request.Form("TextBox1");
this line of code doesn't work as expected, the result will be that
strTextBox == null.

The complete Request.Form Collection is empty.

So where have all the input values gone.

regards
Cyrus Donders
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

P: n/a
ok,

as an add-on.

it seems that Raghavendra T V's statement is true, at least in a the
circumstance that you don't allow coockieless sessions.

however when you do allow cookieless sessions. My statement is true.

regards
Cyrus Donders
"Cyrus Donders" <C_dot_Donders_at_vspaa_dot_nl> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
Hi Raghavendra T V

I just read your reply.

I think that you haven't tried to do what you are suggesting.

string strTextBox = Request.Form("TextBox1");
this line of code doesn't work as expected, the result will be that
strTextBox == null.

The complete Request.Form Collection is empty.

So where have all the input values gone.

regards
Cyrus Donders
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.