Re: Cannot get radioButtonList selection
From: stuart (stuart_at_discussions.microsoft.com)
Date: 06/14/04
- Next message: peshrad: "ASPX standard validator works in IE 6.0, but not in Mozilla 1.4. Why ?"
- Previous message: Nicato: "TextBox Font of part of the text"
- In reply to: VR: "Re: Cannot get radioButtonList selection"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Jun 2004 07:49:01 -0700
Hi there,
I'm getting something similar with the checkboxlist server control. I have the control declared in my aspx file normally but on submitting the page I want to itterate through the data bound collection and the selected value is constantly set at false regardless of the controls state.
a) When looking at the url with method=get I see the controls that are selected, but the controls themselves don't retain thier state (regardless of EnableViewState)
The code is below in my OnSubmit event handler:
'----Are any of our list items checked?
For intLoop = 0 To cblSections.Items.Count - 1 Step 1
If cblSections.Items(intLoop).Selected Then
'----Whatever, is always false.
End If
Next intLoop
Hope someone can help...
"VR" wrote:
> After trying a lot of ways to solve my problem I found that I could retreive
> the selectedValue using Request(rblList.UniqueID) but, let's say, I'm
> getting my control's selected value from outside ASP.Net framework page
> processing that should automatically make the selected value available to
> server code using the object property, correct?
>
>
> regards,
> Victor
>
>
>
>
> "VR" <vcreb@hotmail.com> wrote in message
> news:%23mbPsGXUEHA.2944@tk2msftngp13.phx.gbl...
> > Hi, I'm developing a Web User Control and I put a RadioButtonList control
> > bound to a data source, set it's .dataSource, .dataTextField and
> > .dataValueField properties and when looking in IE's view source everything
> > is Ok (the control's and list's values) but when I submit it to the server
> > (I set autoPostBack = true) I cannot read the selection.
> >
> > I'm trying to read it from my control's codeBehind file not from the
> WebForm
> > Container code behind and all I get is:
> >
> > .selectedValue = ""
> > .selectedIndex = -1
> > .selectedItem = Nothing
> >
> > PS: I declared the radioButtonList object in the code behind file with
> > Protected and WithEvents modifiers.
> >
> > If someone knows anything that could help me...
> >
> >
> > Thanks a lot,
> > Victor
> >
> >
> >
> >
> >
>
>
>
- Next message: peshrad: "ASPX standard validator works in IE 6.0, but not in Mozilla 1.4. Why ?"
- Previous message: Nicato: "TextBox Font of part of the text"
- In reply to: VR: "Re: Cannot get radioButtonList selection"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|