ASP.NET Dropdownlist auto postback

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
GPSAddictAsked:
Who is Participating?
 
ViceroyFizzlebottomConnect With a Mentor Commented:
Is the EnableViewState property set to True?
0
 
GPSAddictAuthor Commented:
yup
0
 
j_s_kelleyConnect With a Mentor Commented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
j_s_kelleyCommented:
Also, are you doing initialization outside of an IsPostBack block.

0
 
GPSAddictAuthor Commented:
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
 
PeteHopeMDACommented:
What does the code  look like for populating the DropDownList?

Are yo doing it in code behind?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.