RE: Drop Down List Box Asp.net (VB)
From: Bin Song, MCP (anonymous_at_discussions.microsoft.com)
Date: 04/08/04
- Next message: Marina: "Re: ado.net"
- Previous message: kyle: "Re: vb.net 2003 module sub main()"
- In reply to: Art DeBuigny: "Drop Down List Box Asp.net (VB)"
- Next in thread: Art DeBuigny: "RE: Drop Down List Box Asp.net (VB)"
- Reply: Art DeBuigny: "RE: Drop Down List Box Asp.net (VB)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 8 Apr 2004 12:51:02 -0700
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() Then
'Bind dropdownlist.
End If
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, MCP
----- Art DeBuigny wrote: -----
I have a drop down list box that I populate with data
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 UserRec
MyUsr = New UserRec
MyUsr.MyValue = DDLListValues.SelectedValue
MyUsr.Update
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?
Thanks
Art DeBuigny
- Next message: Marina: "Re: ado.net"
- Previous message: kyle: "Re: vb.net 2003 module sub main()"
- In reply to: Art DeBuigny: "Drop Down List Box Asp.net (VB)"
- Next in thread: Art DeBuigny: "RE: Drop Down List Box Asp.net (VB)"
- Reply: Art DeBuigny: "RE: Drop Down List Box Asp.net (VB)"
- Messages sorted by: [ date ] [ thread ]