Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2008, 06:12 PM
Registered User
 
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DropDownList resets itself (ASP.NET 2.0 AJAX)

Hi,

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?

Thanks
Aisa







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





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