.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 10th, 2004, 11:44 AM
Xian Xian is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 Xian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool ASP.Net DropDownList Problem

I am having an issue with an ASP.Net page that I cannot solve.

Essentially, the DropDownLists do not always show the right value. 1st things first, I know it is not an IsPostBack issue.
That was the first thing that I was pointed to as being the source of my problem, but I am positive that it is not the relevant
issue.

I have an ASP.Net page which has approx. 30 drop down lists that are populated when the page is loaded. There are several different ways that they are populated, but it does not appear any one way is wrong. An example is:
Code:
 
Dim SDR1 As SqlDataReader
 
With DDL1
 
SDR1 = SqlHelper.ExecuteReader(sqlConn, CommandType.StoredProcedure, "Doc_SensoryLevelList")
 
.DataSource = oDRSensoryLevel
 
.DataBind()
 
SDR1 .Close()
 
oLI = New ListItem
 
oLI.Text = "NA"
 
oLI.Value = "null"
 
.Items.Insert(0, oLI)
 
EndWith


That little snippet fills the drop down list from a stored procedure from my SQL Server. The code works fine, the DDL is filled correctly. But when I go to retrieve the value to send it back to my database, the DDL always has the same value, seemingly the last value.
Code:

prmInsertRound(11).Value = IIf(DDL.SelectedItem.Value = 0, DBNull.Value, DDL.SelectedItem.Value)


The bizzarre thing is that of the 30 Drop Down Lists on my page, only 12 of them have this problem. The others all function correctly, and have no issues. There are no signifigant differences in the way the DDL's are filled, and in the way the data is retrieved.

Once again, I am positive that this is not an IsPostBack issue. Anyone else ever experienced this issue?

Your help is greatly appreciated.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > ASP.Net DropDownList Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT