473,499 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting rid of viewstate in GET posted forms

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
Nov 17 '05 #1
2 1107
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!
Nov 17 '05 #2
Many thanks for the information.

Damon
-----Original Message-----
Hi,

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

there are two workaround :

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

2) create dynamically or statically other form without runat=serverattribute, 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!
.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1009
by: chris s. | last post by:
I've got a problem concerning Server.Execute and the viewstate. It's not a ViewStateMacEnabled=false problem as it happens - less of a problem and more a question of 'is it possible'. I've got a...
1
1754
by: Simon | last post by:
Hi everyone, I have a quick question that I hope someone can help me with: I've made a user control that contains a text box and some validation functionality. This control has a few extra...
2
2127
by: Jerry O | last post by:
Hi, I appear to have a problem where the user is not kicked back to the forms authentictation url when they post a webform, via a get, that results in a long url due to viewstate. Instead they...
5
5924
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
1
3444
by: Tim | last post by:
Greetings! I have a UserControl. On this UserControl is a Panel and a RadioButtonList. The Panel's Visible property is set to false by default. When the user selects a particular...
10
3058
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
3
1919
by: TC | last post by:
Hey All, I have some classes that I recently built for a website which uses the HttpWebRequest & HttpWebResponse objects from the System.Net namespace. Basically, the classes rap submitted data...
4
5070
by: DavidF | last post by:
Hi, I'm having a problem with viewstate encryption on one of my websites. To encrypt the viewstate, I'm using the following lines in my web.Config file: <pages theme="Default"...
0
2217
by: jamestilby | last post by:
Hi all, Hope someone can help with this - I am tearing my hair (singular) out. I developed an application using asp.net 2.0 and Mobile Controls. Up till now I have been testing it with a...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.