|
|
||||||
|
#1
|
|
|
|
|
Is it possible to change the __VIEWSTATE id?
The reason is we shouldn't have any id starting with underscores on XHTML pages. Thank you |
|
|
|
#2
|
|
|
|
|
re:
!> The reason is we shouldn't have any id starting with underscores on XHTML pages. Who told you that ? IDs starting with *double* underscores are perfectly acceptable in XHTML. Check the validity of my ASP.NET FAQ's pages : http://asp.net.do/faq/default.aspx Here's the link to the W3C's validator : http://validator.w3.org/check?uri=ht... line&group=0 Here's the response by the W3C's validator: "This Page Is Valid XHTML 1.0 Transitional!" Now, check "View Source" for that page, and see that the page *does* include a "__VIEWSTATE" id : <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTA1MDI3ODMwMWRkjOh6z8CUeDcuYjV3L6BQzzSZL7Q =" /> The key, of course, is that "__VIEWSTATE" has TWO underscores. <g> Juan T. Llibre, asp.net MVP asp.net faq : [url down] foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "Ivan Gasparetto" <ivangasparetto> wrote in message news:715a [..] |
|
#3
|
|
|
|
|
yes, you have two options:
1) switch to MVC which doesn't generate any any viewstate or unwanted markup. 2) override PageStatePersister and create your own hidden field. google for examples. -- bruce (sqlwork.com) "Ivan Gasparetto" wrote: [..] |
|
#4
|
|
|
|
|
Bruce, why override, if ID's which start with an underscore are perfectly acceptable in XHTML ?
See my just-sent reply to Ivan. Juan T. Llibre, asp.net MVP asp.net faq : [url down] foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "bruce barker" <brucebarker> wrote in message news:63f4 [..] |
|
#5
|
|
|
|
|
starting an id with an "_" has only been recently added to the xhtml spec.
the lastest html 4.01 spec still does not allow an id to start with an "_". see: http://www.w3.org/TR/html401/types.html#h-6.2 -- bruce (sqlwork.com) "Juan T. Llibre" wrote: [..] |
|
#6
|
|
|
|
|
re:
!> the latest html 4.01 spec still does not allow an id to start with an "_". !> see: http://www.w3.org/TR/html401/types.html#h-6.2 Sure, but that's the spec for HTML 4.01, not the spec for XHTML. That's why the "eXtensible" specs were added to HTML, right ? ;-) I know that *frame names* cannot begin with an underscore in both html and xhtml ( probably so there's no confusion with reserved names like "_top", "_blank", "_parent", etc ). Juan T. Llibre, asp.net MVP asp.net faq : [url down] foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "bruce barker" <brucebarker> wrote in message news:8b50 [..] |
|
#7
|
|
|
|
|
no. the thought was that html would be easier process (or parse) if it
was xml compliant (an xml reader could be used). its was based on a subset of html 4.0 xhtml is dead (no more versions). the W3C is replacing it with html 5.0 note: safari and firefox are already adding 5.0 features. -- bruce (sqlwork.com) Juan T. Llibre wrote: [..] |
|
#8
|
|
|
|
|
re:
!> the W3C is replacing it with html 5.0 It's replacing it with XHTML2... XHTML2 working group : http://www.w3.org/MarkUp/ HTML working group : http://www.w3.org/html/wg/ Juan T. Llibre, asp.net MVP asp.net faq : [url down] foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "bruce barker" <nospam> wrote in message news:4164 [..] |
|
#9
|
|
|
|
|
"Ivan Gasparetto" <ivangasparetto> wrote in message
news:715a > Is it possible to change the __VIEWSTATE id? > The reason is we shouldn't have any id starting with underscores on > XHTML pages. > Google around and you'll find it's valid... however the FORM NAME attribute is not. There is something you can add to webconfig to make ASP.NET generate XHTML compliant output... <system.web> <!-- other elements here --> <xhtmlConformance mode="Strict" /> </system.web> Copied form http://msdn.microsoft.com/en-us/libr...59(VS.80).aspx |
|
#10
|
|
|
|
|
The reason is we shouldn't have any id starting with underscores on XHTML
pages. Who told you that ? R: ISO and the W3C did! http://www.w3.org/TR/2000/WD-xml-2e-20000814#charsets Kind regards, Ivan |
|
#11
|
|
|
|
|
__VIEWSTATE starts with TWO underscores...and it's perfectly valid.
Juan T. Llibre, asp.net MVP asp.net faq : [url down] foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "Ivan Gasparetto" <Ivan Gasparetto> wrote in message news:9b61 [..] |
|
|
| Similar Threads | |
| __VIEWSTATE different between localhost and server Hello, I was testing my application on my localhost, when I View Source, I see the __VIEWSTATE and its only small in size (about 500 bytes). When I copy this same... |
|
| ASP + Ajax + __VIEWSTATE = BAD ? I have a ASP 2.0 page where I use some Ajax code. The Ajax code (JavaScript) is inserted from CodeBehind. In my page I have a submit button and some links for Ajax... |
|
| __VIEWSTATE Hi all, We have a problem here regarding this __VIEWSTATE data. CMS always keep data in viewstate and the data might be very big. Our search engine will only search for the... |
|
| __VIEWSTATE I have a page, with an iframe in it. the iframe loads up another ASPX page, I have set both pages enableviewstate=false The problem is, if I click on anything on the main... |
|
| __VIEWSTATE data HUGE!!! I have an application being developed and I've noticed that in most of the pages the __VIEWSTATE data is HUGE, about 4 pages full in many cases. This leads to bloated page... |
|
|
All times are GMT. The time now is 02:38 PM. | Privacy Policy
|