?
Solved

Maintain viewstate of client controls

Posted on 2006-11-12
2
Medium Priority
?
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
jay_gadhavi earned 1000 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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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