V
Vikas Kumar
i am selectin some data from database and through reader showing it in
datalist as above now for radio buttons i have single column which returns
1,2,3 and according to that i want one of above radio button to be
preselected in this datalist how can i do that
doing something like this
but this gives error "The type or namespace name 'rdbtn' could not be found
(are you missing a using directive or an assembly reference?)"
as its in datalist
<table width="100%">
<tr width="100%">
<td width="25%"><%#DataBinder.Eval(Container.DataItem,"FName")%></td>
<td width="25%"><input type=text name="txtPass"
value='<%#DataBinder.Eval(Container.DataItem,"Passwd")%>'></td>
<td width="45%" align="left">
<input type=hidden name="txtPerm"
value='<%#DataBinder.Eval(Container.DataItem,"Permission")%>'>
<%string x=Request.Form.Get("txtPerm");%>
<% if(x=="1")
{
rdbtn.SelectedValue="1";
}
else if(x=="2")
{
rdbtn.SelectedValue="2";
}
else if(x=="3")
{
rdbtn.SelectedValue="3";
}%>
</td>
<td width="5%" align="left">
</td>
</tr>
</table>
datalist as above now for radio buttons i have single column which returns
1,2,3 and according to that i want one of above radio button to be
preselected in this datalist how can i do that
doing something like this
but this gives error "The type or namespace name 'rdbtn' could not be found
(are you missing a using directive or an assembly reference?)"
as its in datalist
<table width="100%">
<tr width="100%">
<td width="25%"><%#DataBinder.Eval(Container.DataItem,"FName")%></td>
<td width="25%"><input type=text name="txtPass"
value='<%#DataBinder.Eval(Container.DataItem,"Passwd")%>'></td>
<td width="45%" align="left">
<input type=hidden name="txtPerm"
value='<%#DataBinder.Eval(Container.DataItem,"Permission")%>'>
<%string x=Request.Form.Get("txtPerm");%>
<% if(x=="1")
{
rdbtn.SelectedValue="1";
}
else if(x=="2")
{
rdbtn.SelectedValue="2";
}
else if(x=="3")
{
rdbtn.SelectedValue="3";
}%>
</td>
<td width="5%" align="left">
</td>
</tr>
</table>