Solved

Maintain viewstate of client controls

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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