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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:14:01+00:00 2026-05-15T03:14:01+00:00

Why when a control does contain value but it’s set to .Enable=False that all

  • 0

Why when a control does contain value but it’s set to .Enable=False that all controls become disable (that’s ok) but why that the ViewState doesn’t retain the data on the next post back? If I get the UserControl without modifing its Enable state, the ViewState work between post back.

How can we disable a UserControl that all its control become disable (this part work) but all of them KEEP use the ViewState (this doesn’t work)?

Clarification:

1)In the aspx.cs click button EDIT:

myControl.Enabled = false;
//This produce to have all controls in myControl to be disabled.

2)In the asp.cs: click Save to leave the EDIT state:

myControl.Enabled = true;
//This produce that all controls inside myControl are blank : no viewstate!

Other postback works because we do not put myControl.Enable to false.

  • 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-15T03:14:02+00:00Added an answer on May 15, 2026 at 3:14 am

    Specifying .Enable=False is like a server-side disable, NOT a client-side disable. This is for security purposes so you can truly disable an input element even if the user uses some client-side trickery to “re-enable” it. If you want to perform a client-side disabling, you’ll need to use script for that, or perhaps use a readonly attribute.

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

Sidebar

Related Questions

Does the Multiview control contain the viewstate information for each of its views regardless
Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of
Does any one know of a control that i can use with a ASP.Net
I'm trying to figure out why the control does not honor ZIndex. Example 1
Is there any sort of free control which does what the Occupation field does
Which are the events of an ASP .Net server control and how does their
How does Google Chrome command and control multiple cross platform processes and provide a
How does one bind an iPhone SDK control (say a UISlider) using Interface Builder?
Does anyone know if anyone makes a watermarked textbox control for the compact framework?
does anybody know how to make a numericupdown control for asp. There's one for

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.