Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting rid of viewstate in GET posted forms

Reply
Thread Tools

Getting rid of viewstate in GET posted forms

 
 
damonf
Guest
Posts: n/a
 
      11-03-2003
I'm trying to post data in ASP.NET using the GET method
for the form rather than POST. I've disabled viewstate
on all the controls and at the page level but I still
keep getting _Viewstate in the URL. Is there any way to
control aspx pages so they display tidy querystrings
without all the other stuff?

Thanks

Damon
 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      11-03-2003
Hi,

Well, as long as the form holds the runat=server attributes ASP.NET will
render __viewstate even if you disable view state for all page controls
and page. if you will remove runat=server attribute toy cant use server
control at this form.

there are two workaround :

1) use client side script to remove __viewstate field before submitting
the form.

2) create dynamically or statically other form without runat=server
attribute, add your fields and data and submit that form.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
damonf
Guest
Posts: n/a
 
      11-08-2003
Many thanks for the information.

Damon

>-----Original Message-----
>Hi,
>
>Well, as long as the form holds the runat=server

attributes ASP.NET will
>render __viewstate even if you disable view state for

all page controls
>and page. if you will remove runat=server attribute toy

cant use server
>control at this form.
>
>there are two workaround :
>
>1) use client side script to remove __viewstate field

before submitting
>the form.
>
>2) create dynamically or statically other form without

runat=server
>attribute, add your fields and data and submit that form.
>
>Natty Gur[MVP]
>Phone Numbers:
>Office: +972-(0)9-7740261
>Fax: +972-(0)9-7740261
>Mobile: +972-(0)58-888377
>
>
>*** Sent via Developersdex http://www.developersdex.com

***
>Don't just participate in USENET...get rewarded for it!
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Datagrid, posted data, and viewstate size rgouge ASP .Net 0 07-29-2005 04:39 PM
How do I know when to use the Viewstate and when to use the posted data? :-) Simon ASP .Net 1 11-09-2004 02:32 AM
Cant get rid off viewstate Mariano Drago ASP .Net 5 04-09-2004 02:39 PM
Viewstate errors... how do I get viewstate working? mark ASP .Net Building Controls 0 02-20-2004 02:17 PM



Advertisments