473,385 Members | 1,474 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,385 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 13370
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.