Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 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 January 22nd, 2004, 01:09 AM
Authorized User
 
Join Date: Nov 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to koneruvijay
Default DropDownList Error

Hello Folks

I am having 3 textboxes and a dropdownlist in my webpage.Dropdownlist is binded to database which get values.I have set ddl autopostback property to true.After selecting one item the data related to that item must be displayed in the textbox.

But the problem here is if i try to select the vvalue in the ddl the value what i have selected is not displayed in the ddl it is showing the initial value means bindingagain in pageload.If i place (if!(ispostback)) property then second time when the page is autopostback then the items in the ddl are disappeared.May i know how to bind the DDl in the pageload to get my output please give me som useful links

 
Old January 22nd, 2004, 10:42 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What you describe sounds correct. You only need to databind once (not ispostback) like you are doing. If you are loosing the values, then there is something else wrong. Is the dropdownlist viewstate enabled? (Unless you DISabled it, it should be on, that's the default.) Paste the relevant bits of code relating to the ddl (markup and code-behind) and we'll take a look.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 22nd, 2004, 11:47 PM
Authorized User
 
Join Date: Nov 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to koneruvijay
Default

You r correct plano.The viewstate is in the false state.Thank u very much friend






Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdownlist ngadiman BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 17th, 2007 01:06 AM
DropdownList Venkatesan ASP.NET 1.0 and 1.1 Basics 1 December 11th, 2006 11:03 AM
DropDownList Lu5ck ASP.NET 2.0 Basics 3 October 13th, 2006 04:05 AM
how to get value from dropdownlist vandat ASP.NET 1.0 and 1.1 Basics 3 November 28th, 2005 12:47 AM





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