Solved

Maintain viewstate of client controls

Posted on 2006-11-12
2
240 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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