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 594591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:58:12+00:00 2026-05-13T15:58:12+00:00

I am just looking into converting WebForms to MVC: In .net MVC, what concepts

  • 0

I am just looking into converting WebForms to MVC:

In .net MVC, what concepts make ViewState something thats not required?

If a form is posted back on iteself etc (ie a postback)? how does the page/usercontrol maintain its state?

What tricks are people doing to maintain some kind of state and not resort to session state?

Surely, a completely stateless environment cant exist?

  • 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-05-13T15:58:13+00:00Added an answer on May 13, 2026 at 3:58 pm

    But of course it can. In fact, the web is stateless. Any thoughts to the contrary are the aberration, in fact.

    Web Controls are gone in MVC. There are no events firing on the server side. This is replaced by two different mechanisms–URLs and POSTing form data. Proper use of these will replace your need for the ViewState.

    In a conventional ASP.NET web application, you would place a LinkButton on your webpage that would perform function X. ASP.NET would stick lots of ViewState cruft, javascript and other stuff into the webpage so that, when the user clicks on the button and “posts back” to the website (by submitting a form nobody knows existed), ASP.NET reconstructs what happened and determines a particular button event handler must be executed.

    In MVC, you construct your link to access a particular route. The route describes what the user wishes to do–/Users/Delinquent/Index (show a list of all delinquent users). The routing system in MVC determines which Controller will handle this route and which method on that controller will execute. Any additional information can be transmitted to the controller method by URL query string values (?Page=5 for the 5th page of delinquents).

    In addition to URLs, you can use HTML forms to POST back more complex information (such as a form’s worth of data) or things that won’t fit in a query string, such as a file.

    So you “maintain” state via query strings and form POST values. You’ll find that, in fact, there isn’t that much state to maintain in the end. In fact, having to maintain lots of state is a good indication that your design is lacking or that you’re trying to do something that doesn’t fit a website model.

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

Sidebar

Related Questions

I have just been looking into Linq with ASP.Net. It is very neat indeed.
I was just looking into the memory allocation of a program in C .
I just began looking into source control.... And installed subversion from collabnet... I also
How would you test this scenario? I've just started looking into NHibernate and having
I am just looking at sorting an NSArray of NSNumbers into numeric order but
I was just going to use the FileUpload.FileBytes property but looking into the respective
Just looking for the relevant documentation. An example is not necessary, but would be
I am looking into converting my OpenGL rendering code to take advantage of a
There are many tools for converting latex into html . I'm looking for a
Just converting some shell scripts into batch files and there is one thing I

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.