Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 20847 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > ASP.NET Interview Questions > Can I make viewstate enabled for control ...

Can I make viewstate enabled for controls where Enableviewstate of the container page is set to false?

Interview question and answer by: Bhakti | Posted on: 12/17/2009 | Category: ASP.NET Interview questions | Views: 1847 |
Ads
Ads


Answer:

No.
You can set it to true or false as per your requirement but in fact it will not have any effect to the controls. Because viewstate in ASP.NET has hierarchical nature. Hence, following code will not work if you have set EnableViewState = false; for page.
protected void Page_Load(object sender, EventArgs e)

{
txtTest.EnableViewState = true;
}

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Bhakti

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 9:57:59 PM