473,399 Members | 3,656 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,399 software developers and data experts.

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 13371
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
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
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
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
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
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
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
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
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
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
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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
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...
0
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...

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.