Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GET method

Status
Not open for further replies.

dragonwell

Programmer
Oct 21, 2002
863
US
Has anyone successfully used the GET method (as opposed to the default of POST) for forum submission in ASP.NET? Seems like your viewstate would use it all up, even if disabled. Would be nice, though, for searches.

Greetings,
Dragonwell
 
I tend to do an implicit get :)

I.E. I will place the querystring into an anchor tag.. and let the user select it via a href..

e.g. <a href=
No postback -> no viewstate

ROb

PS the a tag is built dynamicly (usually on the server) but you could modify it using dhtml and insertadjacenthtml...
 
In most other web development I've done you could specify a form's method to be GET. This would case all the name/value pairs from the form to be apended to the querystring of the url to the form's action page. The action page would then get the values from the request.

Basically I want to submit a form but not have any postback, without resorting to building up the url during a postback event and then redirecting back (the get), which is how I've worked around it.

I know ASP.NET is not made to work this way out of the box -just wondering if anyone's found a way to do it. I haven't spent too much time trying to figure it out because if someone else already has, why re-invent the wheel?





Greetings,
Dragonwell
 
Set postback to false if you dont' want it..
most controls have a viewstate property. Set that to false.


Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top