Solved

ASP.NET Dropdownlist auto postback

Posted on 2009-05-14
6
492 Views
Last Modified: 2013-11-26
I have this dropdownlist which its selectedvalue is set as a datasource parameter. That dropdownlist is also set to auto postback to refresh the datasource and the binded grid. Everything works fine but how can I make the dropdownlist to retain it's value after the postback ?? Thanks
0
Comment
Question by:GPSAddict
6 Comments
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 250 total points
ID: 24387856
Is the EnableViewState property set to True?
0
 

Author Comment

by:GPSAddict
ID: 24387898
yup
0
 
LVL 4

Assisted Solution

by:j_s_kelley
j_s_kelley earned 250 total points
ID: 24388086
Are you checking the value in the Page_Load or in the event for the DDL?  Sometimes, I have found that the value isn't available in the Page_Load, but it is in the event for the DDL.
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 4

Expert Comment

by:j_s_kelley
ID: 24388099
Also, are you doing initialization outside of an IsPostBack block.

0
 

Author Comment

by:GPSAddict
ID: 24388133
No code is written...
<SelectParameters>
                <asp:ControlParameter ControlID="ddlCategory" Name="IFA_PCP_REC_CATEGORY_ID" 
                    PropertyName="SelectedValue" Type="Decimal" />
            </SelectParameters>

Open in new window

0
 
LVL 1

Expert Comment

by:PeteHopeMDA
ID: 24388618
What does the code  look like for populating the DropDownList?

Are yo doing it in code behind?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…

830 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