Solved

Maintain viewstate of client controls

Posted on 2006-11-12
2
233 Views
Last Modified: 2012-06-21
Hi!

On my web site I have both client and server controls and a problem I struggle with is that the selcted index of a client side SELECT control is reset to 0 every time a server control posts back to the server.

I've set enableviewstate="true" on the SELECT control but it does not matter.

What to do?

0
Comment
Question by:ekberglinda
2 Comments
 
LVL 3

Accepted Solution

by:
jay_gadhavi earned 250 total points
ID: 17928702
I think u fill up the "SELECT" CONTROL at the page load time and when ever your page load event fire  the "SELECT" control fill up second time and then.....

So put the code which fill up the "SELECT" IN THE
if not  Page.IsPostBack then

'Your code for filling up the combo or select option

end if

Regards,
jay
0
 

Author Comment

by:ekberglinda
ID: 17928715
I made it a server control instead and then it kept its view state after postbacks.
But since your answer is correct I give you the points.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now