G
Guest
I have a radiobuttonlist like so
<asp:RadioButtonList id=radType RepeatDirection="Horizontal" cellpadding="10" cellspacing="0" runat="server"><asp:ListItem value="Something1"><font face="arial,helvetica" size="2">Something 1</font></asp:ListItem><asp:ListItem value="Something2"><font face="arial,helvetica" size="2">Something 2</font></asp:ListItem><asp:ListItem value="Something3"><font face="arial,helvetica" size="2">Something 3</font></asp:ListItem><asp:ListItem value="Something4"><font face="arial,helvetica" size="2">Something 4</font></asp:ListItem></asp:RadioButtonList
The selected value of the radType is saved to a table
When opening the page, I am using a datareader to read a row in a table, I then need to make one of the items in the list selected based on what is in the table row. Eg
Dim DBConnection As SQLConnectio
Dim DBCommand As SQLComman
Dim DBReader As SQLDataReade
Dim SQLString As Strin
DBConnection = New SQLConnection("connection string here"
DBConnection.Open(
SQLString = "SELECT * from table1 where uid='" & request("uid") & "'
DBCommand = New SQLCommand(SQLString, DBConnection
DBReader = DBCommand.ExecuteReader(
DBReader.rea
radJobType.selectedvalue=DBReader("type")
DBReader.Close(
DBConnection.Close(
This doesn't seem to work. How can I make the item in the radiobuttonlist selected based on the value in the row
Thanks
<asp:RadioButtonList id=radType RepeatDirection="Horizontal" cellpadding="10" cellspacing="0" runat="server"><asp:ListItem value="Something1"><font face="arial,helvetica" size="2">Something 1</font></asp:ListItem><asp:ListItem value="Something2"><font face="arial,helvetica" size="2">Something 2</font></asp:ListItem><asp:ListItem value="Something3"><font face="arial,helvetica" size="2">Something 3</font></asp:ListItem><asp:ListItem value="Something4"><font face="arial,helvetica" size="2">Something 4</font></asp:ListItem></asp:RadioButtonList
The selected value of the radType is saved to a table
When opening the page, I am using a datareader to read a row in a table, I then need to make one of the items in the list selected based on what is in the table row. Eg
Dim DBConnection As SQLConnectio
Dim DBCommand As SQLComman
Dim DBReader As SQLDataReade
Dim SQLString As Strin
DBConnection = New SQLConnection("connection string here"
DBConnection.Open(
SQLString = "SELECT * from table1 where uid='" & request("uid") & "'
DBCommand = New SQLCommand(SQLString, DBConnection
DBReader = DBCommand.ExecuteReader(
DBReader.rea
radJobType.selectedvalue=DBReader("type")
DBReader.Close(
DBConnection.Close(
This doesn't seem to work. How can I make the item in the radiobuttonlist selected based on the value in the row
Thanks