Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: dropdownlist box not working correctly

Thread Tools

Re: dropdownlist box not working correctly

Hermit Dave
Posts: n/a
show me the page load code. or rather the way you populate the dropdownlist

you should also use
if not Page.IsPostBack then

' and populate the controls code here

end if

(my Bad if the code is not correct i use c# and here is how you do

// populate the data or call a methd that does it.



Hermit Dave
"Paul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi I have a dropdown list box being filled with a stored procedure, this
> works ok. I have autopostback set to true and on the selectedIndexChanged
> event for the selected value and selected item it always is the first
> element
> no matter what is selected. I set a breakpoint in the event to check, and
> have the data text field and data value field of the control are both
> string
> types as filled by the procedure.
> Private Sub dr_user_SelectedIndexChanged(ByVal sender As System.Object,
> ByVal e As System.EventArgs) Handles dr_user.SelectedIndexChanged
> Dim tmpstring As String
> Dim tempint As Integer
> '''''''''''''''''''''''''''''''''''''''''''''''''
> tmpstring = dr_user.SelectedItem.Text
> tmpstring = dr_user.SelectedValue.ToString
> --
> Paul G
> Software engineer.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
BUG: German Umlauts in DropDownList not working correctly Asus ASP .Net Web Controls 1 03-19-2005 11:07 AM
sort not working correctly =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?= ASP .Net 4 08-18-2004 01:43 PM
History not working correctly Stuart Palmer HTML 0 06-02-2004 09:50 AM
Cisco 1721 and routing not working correctly Brian Cisco 4 10-24-2003 10:37 PM