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

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

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

GPSAddictAuthor Commented:
No code is written...
                <asp:ControlParameter ControlID="ddlCategory" Name="IFA_PCP_REC_CATEGORY_ID" 
                    PropertyName="SelectedValue" Type="Decimal" />

Open in new window

What does the code  look like for populating the DropDownList?

Are yo doing it in code behind?
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.