467,180 Members | 1,147 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,180 developers. It's quick & easy.

Where have the form values gone

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
  • viewed: 1444
Share:
3 Replies
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
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
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.

Similar topics

9 posts views Thread by Susan Bricker | last post: by
7 posts views Thread by Muscha | last post: by
12 posts views Thread by TheOne | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.