Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 11th, 2008, 06:12 PM
Registered User
Join Date: Jun 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DropDownList resets itself (ASP.NET 2.0 AJAX)


I am using VS2005, C#, ASP.NET 2.0 AJAX to develop a web page. I have a UpdatePanel on the form. Inside it, I have two asp:RadioButtons (RB), a asp:DropDownList (DDL) control and a asp:TextBox (TXT) control. Depending on which RB I select, the DDL will be bound to different DataSources (DataTable). When I select an item from the DDL, the TextBox should show the Text of the DDL. So the code so far is...

Defined two static DataTable objects (multiple fields). They are filled in Page_Load if it is not a IsPostBack. AutoPostBack is true for all controls. Defined OnCheckedChanged for the RB. This procedure binds the required datasource to the first DropdownList (DataSource,DataTextField,DataValueField). Implemented OnSelectedIndexChanged to the DDL to execute the code to fill the text.

The problem is this. When I select the RB, the DDL binds correctly. But when I select an item from the DDL, the DDL resets itself and no text is written.

What am I doing wrong?


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
ajax in asp.net imjayakumar Crystal Reports 0 April 3rd, 2007 07:26 AM
asp.net dropdownlist cena BOOK: Beginning ASP.NET 1.0 0 March 19th, 2006 01:21 AM
DropDownList in ASP.NET shurabhavesh ASP.NET 1.0 and 1.1 Basics 3 June 1st, 2005 09:25 AM
ASP.NET Dropdownlist pvasudevan ASP.NET 1.0 and 1.1 Professional 4 August 31st, 2004 11:21 AM

All times are GMT -4. The time now is 04:57 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.