use ddl.items.findbyvalue('val').selected=true;

On Sat, May 22, 2010 at 1:20 AM, Ana <[email protected]> wrote:

> Hi Keidrick,
>
> Thanks for your reply. I took a look at the link you sent, but that's
> exactly what I'm doing. The problem is that when I try to set the
> selected value, it is not changed and I can't see why. Can you help me
> with this?
>
> Ana
>
> On May 21, 1:07 pm, KeidrickP <[email protected]> wrote:
> > take a look at thishttp://
> 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
>



-- 
Ravindra kumar
delhi

Reply via email to