Where have the form values gone

C

Cyrus Donders

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
 
R

Raghavendra T V

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
 
C

Cyrus Donders

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
 
C

Cyrus Donders

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top