One Clarification

S

ss

I have a doubt.
I have 2 webform W1, W2 with a Button control B1, B2
respectively.
In From W1 on click of button B1, i redirect response to
WebForm W2 along with a querystring value. [w2.aspx?test=c]

Now, on W2, i get this value using Response.Queystring...
no issues. The issue comes, when i post W2 by clicking on
Button B2. And the issues is that i can still get the
querystring value c even though i used "Post" method.

To this day i used to think that querystring should be
cleared if the form is posted using "Post". Am i wrong?
Is it a dot net implementation only? To preserver Query
String?
 
S

S. Justin Gengo

ss,

Yes, this is a new feature of .net

It used to take a lot of extra coding to keep persisting querystring values
so microsoft built it in for us.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
K

Kevin Spencer

ASP.Net uses WebForms, which are a special type of form that has server-side
event handlers. The event handlers are triggered by a PostBack, which means
that the form submits back to itself. In order to preserve the state of the
WebForm between PostBacks, the QueryString (as well as all other elements of
the WebForm) must also be retained as it was originally. This is done on the
server.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top