Solved

ASP.NET Dropdownlist auto postback

Posted on 2009-05-14
6
493 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 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validation for a field in asp.net 3 30
Display info from DB to Label in asp.net 7 44
asp.net repeater server posting 5 38
Error in Visual Project 10 48
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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