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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:09:32+00:00 2026-05-25T15:09:32+00:00

I have an webforms website with 20+ controls per page to display data, I

  • 0

I have an webforms website with 20+ controls per page to display data, I have 2 options to persist values:

  1. Use web controls to show all my values and take advantage of ViewState. Just need to populate controls when IsNotPostback and they will render same values every time using ViewState.

  2. Disable ViewState and populate controls on every postback from database.

I just have to go once to DB, I’m filling the 20 controls using the same query.

Which one is cheaper?, should I use ViewState or not?

  • 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-25T15:09:32+00:00Added an answer on May 25, 2026 at 3:09 pm

    based on your input I would say surely is better to have the ViewState overhead back and forth in the transfers rather than executing all the times 20 roundtrips to the database to load the data again and again.

    Of course you could have caching and / or query all needed data in a single super fast db call so that could also be cheap in the end, depending on your overall design.

    ViewState nowadays should not be a big issue thinking about fast LAN / WAN connections and especially if the web site is used only in the Intranet, then I would leave the ViewState, but I would also try to optimize/minimize db calls in general and cache as well.

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

Sidebar

Related Questions

I have a Webforms, AJAX-enabled web page which, when rendering large amounts of data,
I have a webforms page that makes quite extensive use of AJAX. There are
I have a webforms application. Almost all pages in my website are protected by
I have a small website developed using VS2005 and mySQl, it's just 2 webforms
I have a web site that runs both classic ASP and ASP.NET Webforms. The
I have a asp.net webforms page in which I'm using the jqGrid component. The
We have a website build in the umbraco 4.1 cms (webforms) default .net 3.5
Given: I have a website that includes both ASP.NET Web Forms and Classic ASP
I have an ASP.NET web site which contains some ImageButton controls that cause postbacks
I have asp.net 4 webforms website which references PortableLibrary project. In the website 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.