How to pass dataList(one field) value to a Radiobutton List ??
Regards,
Arun.M.D
Regards
Sankar
Can any other method is possible to bind a datalist value to
RadioButton List Web contro??
Regards,
Arun.M.D
string strqry;
strqry = "SELECT PRODUCTID,PRODUCTNAME FROM PRODUCTS WHERE PRODUCTNAME
LIKE 'A%'";
Scmd = new SqlCommand(strqry,Con);
Con.Open();
SDR = Scmd.ExecuteReader();
rbl.DataSource = SDR;
rbl.DataTextField = "PRODUCTNAME";
rbl.DataValueField = "PRODUCTID";
rbl.DataBind();
Regards,
SkyMania
When i use above coding it says "rbl" is not declared error....
I used like this....
myconn1 = New
SqlConnection("server=localhost;DataBase=Banking;Trusted_Connection=True")
mycommand = New SqlCommand("Select * from
Adm_Super_LoginMaster", myconn1)
myconn1.Open()
myread = mycommand.ExecuteReader()
myread.Read()
rbl.DataSource = myread
rbl.DatavalueField = "Adm_id"
rbl.DataBind()
myread.Close()
myconn1.Close()
In this coding it shows erron on this line
"rbl.DataSource = myread
"
And ERROR is:
Object variable or With block variable not set.
Regards,
Arun.M.D
Regards,
SkyMania