473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

DropDownList Refuses To Show New SelectedValue

I have a webform that contains a DropDownList. When the user selects a new
value and I click the submit button, the previously selected SelectedValue
property is used in my code. This is obviously preventing me from updating
my database, or even allowing the user to do anything that involves the
value of this DropDownList. What could the problem be here? I am using
ASP.NET 1.1 with Visual Studio .NET 2003 and am doing my testing with
Internet Explorer 6.0 on Windows XP Professional SP2. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 1 '06 #1
3 1405
Perhaps you're rebinding the control to your datasource in some other
event further up the stack (like init or load), and thus losing the
value that was actually posted back? Alternatively, other weird
behaviour ensues when the ID of the control changes between postbacks.

Jono

Nathan Sokalski wrote:
I have a webform that contains a DropDownList. When the user selects a new
value and I click the submit button, the previously selected SelectedValue
property is used in my code. This is obviously preventing me from updating
my database, or even allowing the user to do anything that involves the
value of this DropDownList. What could the problem be here? I am using
ASP.NET 1.1 with Visual Studio .NET 2003 and am doing my testing with
Internet Explorer 6.0 on Windows XP Professional SP2. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 1 '06 #2
What evert are you using to get the SelectedValue? Page_Load?

"Nathan Sokalski" wrote:
I have a webform that contains a DropDownList. When the user selects a new
value and I click the submit button, the previously selected SelectedValue
property is used in my code. This is obviously preventing me from updating
my database, or even allowing the user to do anything that involves the
value of this DropDownList. What could the problem be here? I am using
ASP.NET 1.1 with Visual Studio .NET 2003 and am doing my testing with
Internet Explorer 6.0 on Windows XP Professional SP2. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 1 '06 #3
I am placing a Response.Write() method at the end of the Click event of the
submit button. The value I am passing to the Write() method is the
DropDownList's SelectedValue property.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"MarkAurit" <Ma*******@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
What evert are you using to get the SelectedValue? Page_Load?

"Nathan Sokalski" wrote:
>I have a webform that contains a DropDownList. When the user selects a
new
value and I click the submit button, the previously selected
SelectedValue
property is used in my code. This is obviously preventing me from
updating
my database, or even allowing the user to do anything that involves the
value of this DropDownList. What could the problem be here? I am using
ASP.NET 1.1 with Visual Studio .NET 2003 and am doing my testing with
Internet Explorer 6.0 on Windows XP Professional SP2. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit...
3
by: Randy Armknecht | last post by:
The problem is that when the SelectedIndex is changed, it posts back the page. It does not however fire the OnSelectedIndexChanged event, and it does NOT keep the state of the item that was...
3
by: sling blade | last post by:
Hi, I have a dropdownlist in my DataList control and I am trying to set the SelectedItem property of the dropdownlist so when the datalist displays the user will see the text in the dropdownlist...
0
by: Daniel Doyle | last post by:
Hello and apologies in advance for the amount of code in this post. I've also sent this message to the Sharepoint group, but thought that ASP.NET developers may also be able to help, even though...
3
by: Nathan Sokalski | last post by:
I have a webform that contains a DropDownList. When the user selects a new value and I click the submit button, the previously selected SelectedValue property is used in my code. This is obviously...
1
by: mitchman10 | last post by:
My Time table has TimeID,Employee,PayPeriod,ChargeCodeID,Hours My Chargecode table has ChargecodeID,c_Text I need an Editable datagrid that will show the TimeID,Employee,PayPeriod,C_Text in a...
1
by: JJ | last post by:
Hi. I am having trouble getting a dropdownlist to work properly in a detailsview: The code is something like: <asp:DetailsView ID="dvwSubscriber" runat="server" AutoGenerateRows="False" ...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
5
by: nzkks | last post by:
Hi I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005, Formview controls In a ASP.Net form I have 20 textboxes and 20 dropdownlists(ddl). All ddl(s) are databound and get...
6
by: shashi shekhar singh | last post by:
Respected Sir, I have to create multiple dynamic dropdownlist boxes and add items dynamically in <asp:table> server control but problem occurs , i.e. except of fist dropdown list no dropdownlist...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.