Good. Glad that you've got it working.
Have a nice day!
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
--------------------
| From: "Ankit Aneja" <ef*****@newsgr oups.nospam>
| References: <uO************ **@TK2MSFTNGP12 .phx.gbl>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
<yi************ **@TK2MSFTNGXA0 1.phx.gbl>
| Subject: Re: problem with radiobutton list control
| Date: Thu, 6 Oct 2005 18:50:53 +0530
| Lines: 109
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <Oa************ **@TK2MSFTNGP14 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: dsl-upwest-static-039.7.246.61.to uchtelindia.net
61.246.7.39
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1294 46
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| thanks Steven
| i was able to do it after Eliyahu's reply
| "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| news:yi******** ******@TK2MSFTN GXA01.phx.gbl.. .
| > Thanks for Eliyahu's input,
| >
| > Hi Ankit,
| >
| > As Eliyahu has mentioned, we can use the RadioButtonList .DataTextField
and
| > DataValueField to specify which field from the DataSource Item we want
to
| > bind. So in your scenario, there exist the "certName" column from the
| > database records, we can specify the RadioButtonList .DataTextField as
the
| > "certName" so that the certName column's value will be bind as the
| > RadiobutotnList 's item's display value, (and it's the same for
| > DataValueField. ..)
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure!
www.microsoft.com/security
| > --------------------
| > | From: "Eliyahu Goldin" <re************ *@monarchmed.co m>
| > | References: <uO************ **@TK2MSFTNGP12 .phx.gbl>
| > | Subject: Re: problem with radiobutton list control
| > | Date: Thu, 6 Oct 2005 09:33:35 +0200
| > | Lines: 64
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | Message-ID: <e7************ **@TK2MSFTNGP14 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: 212.143.94.2
| > | Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP14.phx. gbl
| > | Xref: TK2MSFTNGXA01.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:1293 71
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | RadioButtonList 1.DataTextField ="certName"
| > |
| > | Eliyahu
| > |
| > | "Ankit Aneja" <ef*****@newsgr oups.nospam> wrote in message
| > | news:uO******** ******@TK2MSFTN GP12.phx.gbl...
| > | > code of my aspx page
| > | >
| > | > <asp:RadioButto nList id="RadioButton List1"
| > | > runat="server"> </asp:RadioButton List>
| > | >
| > | > now i want to bind data from database
| > | > Dim rsComm As SqlCommand
| > | >
| > | > Dim rsReader As SqlDataReader
| > | >
| > | > Dim strSql As String
| > | >
| > | > Dim con As SqlConnection
| > | >
| > | > con = New SqlConnection(" server=abc;UID= sa;PWD=sa;initi al
| > | > catalog=digicer tify")
| > | >
| > | > con.Open()
| > | >
| > | > strSql = "select certName from certDetail"
| > | >
| > | > rsComm = New SqlCommand(strS ql, con)
| > | >
| > | > rsReader = rsComm.ExecuteR eader
| > | >
| > | > rsReader = rsReader
| > | >
| > | > RadioButtonList 1.DataSource = rsReader
| > | >
| > | > RadioButtonList 1.DataBind()
| > | >
| > | > rsReader.Close( )
| > | >
| > | > rsComm.Dispose( )
| > | >
| > | > con.Close()
| > | >
| > | >
| > | >
| > | > it makes radio buttons as no. of items selected but instead of
| > displaying
| > | > certName as selected in query it displays
| > | >
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | > System.Data.Com mon.DbDataRecor d
| > | >
| > | > in front of each radio button
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|