473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Hidden __viewstate form field changes page layout

Me
Is there anyway to control the style/layout of this field?

..NET doesn't generate an ID for it so you can create a style for it or
manipulate it in code.

I've looked on MSDN etc. but can't find the answer.

Thanks in advance,
RWK
Nov 18 '05 #1
2 1969
RWK
I meant CAN'T create a style...

"Me" <me@nowhere.com> wrote in message
news:wf*****************@newssvr31.news.prodigy.co m...
Is there anyway to control the style/layout of this field?

.NET doesn't generate an ID for it so you can create a style for it or
manipulate it in code.

I've looked on MSDN etc. but can't find the answer.

Thanks in advance,
RWK

Nov 18 '05 #2
Hi RWK£¬
Thanks for posting in the community!
From your description, you'd like to do some operations do some operations
on the <input type=hidden name="__VIEWSTATE" ..> field of the ASP.NET web
page and you found the tag not have a "id" property so that you can't
manage to control it,yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my research, the <input type="hidden" name="__VIEWSTATE" > is a
certain hidden field the ASP.NET use to store the PAGE and its controls'
states info.
Here is the detailed infos in MSDN:
#Taking a Bite Out of ASP.NET ViewState
http://msdn.microsoft.com/library/en...001.asp?frame=
true

It it generated and set value when the page is rendered out to client. So
there're no interface for us to manually modify it as a normal html control
because it is not visible in the Serverside page's control collection.(You
may turn on the page's trace to have a proof). Also, I'm not sure why you'd
like to manipulate the "__VIEWSTATE" tag since it is a unvisible element in
client response. Would you please give me some further infos on your
requriment?

And If you do want to modifiy it, here are some particular approachs to do
it:
1. Use a Custom Form class to replace the HtmlForm class and override the
page's Load and Save Viewsate's function, you may view the following tech
article for detailed description on this:
#Valid XHTML within .NET
http://www.liquid-internet.co.uk/con...1article1.aspx

2. Use the ASP.NET response filter to do some modification after the
ASP.NET render out the page and before it is send to client side:
Here are some tech articles on using the Response Filter:
# Producing XHTML-Compliant Pages With Response Filters
http://www.aspnetresources.com/artic...tpFilters.aspx

#Reduce The Size Of Your ASP.NET Output
http://www.codeproject.com/aspnet/WhitespaceFilter.asp

Please check out the preceding suggestions. If you have further questions
or need any assistance, please feel free to post here.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

-------------------------------------------------------------------------
Nov 18 '05 #3

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

Similar topics

7
by: Eduard Dewolf | last post by:
Hi, Im have been changing my site to make it HTML 4.01 compliant As I should, I wrapped all INPUT tags in blocks I wrapped the not visible INPUT type HIDDEN tags in first PRE, later H6 tags...
1
by: Sam Wuebben | last post by:
I would like to add a few hidden field values to a form as it is submited via JavaScript. I have a static page shopping site that uses MIVA shopping cart. Some of the pages are getting quite...
3
by: Jeremy Ames | last post by:
I have a form that contains two hidden values, among other controls. I was wondering, if I change these values in server script and immediately do a server.transfer, do these values get updated...
2
by: Guadala Harry | last post by:
In an aspx file I have declared a hidden field like this: <input id="hTestVal" type=hidden value="-1" runat="server"> Defined in the code-behind like this: protected...
5
by: Thor W Hammer | last post by:
In ASP.NET 2.0, it seems to wrap a div around the hidden form fields such as __ViewState. How do you override this rendering?
4
by: Umut Tezduyar | last post by:
I want to get rid of the hidden field _VIEWSTATE. I tried these: I tried to disable ViewState property. I tried to override Page's RegisterHiddenField method. I tried to override Page's...
3
by: Stimp | last post by:
Is it possible to prevent the <input type="hidden" name="__VIEWSTATE" field from being generated in an aspx page? I'm running off Framework 1.1 The field is messing up a process that I need to...
7
by: reju | last post by:
Hi, I am not using view state.I disabled the view state, but this hidden __VIEWSTATE variable and some text is coming when we are taking the view source.Is there any way to remove this variable?...
1
by: dawidg | last post by:
I have an asp.net page with viewstate disabled. I have a control on the page that dynamically creates controls inside itself, no viewstate. The controls aren't created in Init, but in Load. With...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.