473,503 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drop Down List Box Asp.net (VB)

I have a drop down list box that I populate with dat

I actually have two of them, one databound, one not. The problem is that I can't seem to get the system to recognize that I have actually selected something different than the default.

In the forms edit button I call the code like the following example

Dim MyUsr As UserRe
MyUsr = New UserRe
MyUsr.MyValue = DDLListValues.SelectedValu
MyUsr.Updat

Yet no matter what I select when running the code, the item selected at form_load is always saved as the value

Anyone know what I am doing wrong

Thank

Art DeBuign

Nov 20 '05 #1
4 13374
Hi, Art

There might be 2 reasons
1. You rebind the dropdownlist when the page is posting back. try only bind the dropdownlist in the first load
If not IsPostback() The
'Bind dropdownlist
End I
2. I don't see any property name with selectedValue. try dropdownlist.SelectedItem.Value to get the selected value

BTW, post ASP.NET related problems in DotNet.Framework.aspnet

Bin Song, MC

----- Art DeBuigny wrote: ----

I have a drop down list box that I populate with dat

I actually have two of them, one databound, one not. The problem is that I can't seem to get the system to recognize that I have actually selected something different than the default.

In the forms edit button I call the code like the following example

Dim MyUsr As UserRe
MyUsr = New UserRe
MyUsr.MyValue = DDLListValues.SelectedValu
MyUsr.Updat

Yet no matter what I select when running the code, the item selected at form_load is always saved as the value

Anyone know what I am doing wrong

Thank

Art DeBuign

Nov 20 '05 #2
Hi, Art

There might be 2 reasons
1. You rebind the dropdownlist when the page is posting back. try only bind the dropdownlist in the first load
If not IsPostback() The
'Bind dropdownlist
End I
2. I don't see any property name with selectedValue. try dropdownlist.SelectedItem.Value to get the selected value

BTW, post ASP.NET related problems in DotNet.Framework.aspnet

Bin Song, MC

----- Art DeBuigny wrote: ----

I have a drop down list box that I populate with dat

I actually have two of them, one databound, one not. The problem is that I can't seem to get the system to recognize that I have actually selected something different than the default.

In the forms edit button I call the code like the following example

Dim MyUsr As UserRe
MyUsr = New UserRe
MyUsr.MyValue = DDLListValues.SelectedValu
MyUsr.Updat

Yet no matter what I select when running the code, the item selected at form_load is always saved as the value

Anyone know what I am doing wrong

Thank

Art DeBuign

Nov 20 '05 #3
Doh! That was it. I knew I would be slapping my forehead on this

Worked like a charm, and thanks for the posting note. My bad

Art
Nov 20 '05 #4
Doh! That was it. I knew I would be slapping my forehead on this

Worked like a charm, and thanks for the posting note. My bad

Art
Nov 20 '05 #5

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

Similar topics

3
14205
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists. Each group of Drop Down Lists include 3 Drop Down Lists for date such as: DAY, MONTH, and YEAR. I don't want...
3
6139
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
3
26256
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get...
2
12595
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
4
2112
by: Rudy | last post by:
Hello! I have 4 diffrent drop downlist. I want a user to select a value from a drop down list, and place it in a SELECT statement. How would I put that value in the select statement. And if the...
1
1311
by: rewf | last post by:
Hi, I fave this problem with a drop down list: I have a drop down list that work with a database. In the database I have some word with some spaces before like that "Example Example" My problem...
7
6301
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists. Each group of Drop Down Lists include 3 Drop Down Lists for date such as: DAY, MONTH, and YEAR. I don't want...
4
2825
by: gurvar | last post by:
Hi I'm trying to remove duplicate elements from a Drop Down List Fill in VB.net. Following code worked well with vb6. But I'm getting index out of range if I try to translate it to vb.net code...
0
2140
by: weiwei | last post by:
Hi here is my scenario, I create a drop down list in itemtemplate.(that drop down is created from db), after user click edit command, my ideal plan is have another drop down list in...
0
7199
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
7322
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...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.