?
Solved

ASP.NET Dropdownlist auto postback

Posted on 2009-05-14
6
Medium Priority
?
497 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
[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
6 Comments
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 750 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 750 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
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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