Link to home
Start Free TrialLog in
Avatar of GPSAddict
GPSAddict

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of ViceroyFizzlebottom
ViceroyFizzlebottom
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GPSAddict
GPSAddict

ASKER

yup
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, are you doing initialization outside of an IsPostBack block.

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

Open in new window

What does the code  look like for populating the DropDownList?

Are yo doing it in code behind?