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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:23:26+00:00 2026-05-12T06:23:26+00:00

I have a page with several expandable lists. In a perfect world, I would

  • 0

I have a page with several expandable lists. In a perfect world, I would like to display links to each of these lists and when one is clicked it will reload the page with that particular list displayed. I read that ViewState can eliminate the need for hidden input fields, query strings, etc, but I am not familiar with the concept.

Basically I need to accomplish two things:

  1. Add ID of list to ViewState obj when link is clicked
  2. Read ID from ViewState obj when page is loaded, display that list

Can anyone provide me with some resources and/or help on this topic? Thanks!

  • 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-12T06:23:26+00:00Added an answer on May 12, 2026 at 6:23 am

    ViewState is essentially one long encoded hidden field, stored at the top of your page. The key difference between that and a regular hidden field is that ASP .NET will decode it and parse it automatically on a postback.

    There are better ways to achieve what you want to do.

    • You could use the querystring. All you’re passing is a list ID. Append the list ID to the end of your links, and look for it on Page_Load. Load the appropriate list if you find it. You’ll want to handle the case where a list ID is not passed. The querystring is not evil. It can dramatically help reduce page weight. When used with a decent URL rewriter, you get a lot of control over what gets passed ( and crucially, what doesn’t )
    • If you are using ASP .NET controls ( such as Button or LinkButton ) to trigger the showing of a list, you can set the CommandArgument property and pick that up in the event code. You can then pass this in as a parameter to whatever method or Control is handling your list rendering.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that contains several forms, by submitting each one of them,
I have a page which contains several tables, and I would like to format
Here's my scenario: I have a page containing several links; each link is meant
I have the page and several buttons on it. One of them should post
I have a page of several videos. One can click a thumbnail to play
I have a page that has several ajax submission forms. Each form has a
i have a page that contains several submit buttons however i only want one
I have a complex page that has several user controls like galleries, maps, ads
I have a page with several drop down lists that all have the same
I have a page with several iframes. One of this iframes has a page

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.