take a look at this
http://msdn.microsoft.com/en-us/library/a5kfekd2%28v=VS.85%29.aspx

you can get the selected item or the selected value.


On Fri, May 21, 2010 at 1:59 PM, Ana <[email protected]> wrote:

> Hi, I have the following code:
>
> Protected Sub MyDropDownList_DataBound(ByVal sender As Object, ByVal e
> As System.EventArgs)
>        Dim drv As DataRowView = MRFormView.DataItem
>        Dim ddlValue As String = drv("value")
>        Dim ddl As DropDownList = sender
>
>        If Not IsDBNull(ddlValue) Then
>            ddl.SelectedValue = ddlValue
>        End If
>    End Sub
>
> Let's say  ddlValue = 100. While debugging, when I check the value for
> ddlSelectedValue after the line ddl.SelectedValue = ddlValue,
> ddl.SelectedValue is and empty String "", even though ddlValue = 100.
>
> I know this must be something very simple that are missing, but anyone
> have any suggestions of what is happening?
>
> I appreciate your help!
>
> Ana
>



-- 
Keidrick Pettaway

http://kpettaway.com

Reply via email to