Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:14:50+00:00 2026-06-08T02:14:50+00:00

Why does ASP.NET render the hidden __VIEWSTATE input element within <div></div> ?

  • 0

Why does ASP.NET render the hidden __VIEWSTATE input element within <div></div>?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:14:52+00:00Added an answer on June 8, 2026 at 2:14 am

    They did it to “be more aligned with Web standards” – here is a quote from MSDN Magazine article Enforce Web Standards For Better Accessibility:

    There were some well-known deficiencies in ASP.NET 1.1. The out-of-the-box controls produced code that would not pass validation. That was largely attributed to the way that ViewState was handled in ASP.NET 1.1-using a hidden input tag that was not contained within a block display, like this:

    <input type="hidden" name="__VIEWSTATE" value="dDwtMTU1NzQzNDgy..." />
    

    This, combined with some other syntactical issues, gave ASP.NET 1.1 an unfortunate reputation for non-compliance.
    ASP.NET 2.0 addressed many of the Web standards issues. For example, if you look at the source of ASP.NET 2.0-generated pages, you see that ViewState is now wrapped in a div tag, making it compliant:

    <div>
          <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="dDwtMTU1NzQzNDgy..." />
    </div>
    

    Microsoft has made it known publicly that one of the goals of ASP.NET 2.0 is to be more aligned with Web standards and, in fact, ASP.NET 2.0 lets you create compliant Web sites and controls. A great resource for building compliant Web sites is Stephen Walther’s MSDN® article “Building ASP.NET 2.0 Web Sites Using Web Standards“. This 78-page article goes into great detail on building sites according to Web standards.

    Whether this is truly more aligned with Web standards is open for debate personally I’m not into web standards enough to make my own opinion, I just answer what you asked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does ASP.NET pages render time on Chrome and FF is ~ 3X the
Does ASP.NET MVC provide any way to implement UpdateProgress WebForms control analog? Can anyone
does ASP.NET MVC contain any route contraints baked into the code? if so, how
Does Asp.Net require ActiveX to make Ajax calls? I suspect it does because without
Does ASP.NET 4.0 have any improvements as to inbuilt protection against Session Fixation attacks?
How does asp.net mvc figures out validation error message for particular field? I got
Is it part of Asp.Net MVC 2.0. If not then does Asp.Net MVC 2.0
Ajax needs xmlhttp. Does Asp.net ajax, ajaxcontrol toolkits also needs xmlhttp for their smooth
I have a little question to community. Does ASP.NET MVC allow to execute an
Does the asp.net ReportViewer control work with LinqDataSource? If so are there any examples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.