Plz help
i have a data list in which i have some radiobuttuns in it. i want to reterieve the value of select radio button with groupname="select"
here s d code
| S.No: <%# i++ %> - | |
| Name: | |
| Cat No: | |
| Our Price: | |
| Price: | |
| Price: | |
| Price: | |
| Other Price: | |
| Specification: |
here s d classfile code
m able to reterieve the label vales..... plz sometell me how to reterieve selected radio button value......
Label lblitemNo = (Label)e.Item.FindControl("lblItemNo");
Label lblname = (Label)e.Item.FindControl("lblName");
Label lblcatNo = (Label)e.Item.FindControl("lblCatNo");
.............
and what for selcted radiobutton with groupname("select")
Kirtan PatelPosted Nov 7, 2009, 5:16 AM
you can refer to radio button also as you do with all Control using ID
here is small; code for it
bool CheckedStatus = ((RadioButton)dtlProducts.FindControl("rdPriceTwo")).Checked;
if (CheckedStatus == true)
{
// Do somthing
}
else
{
//Do somthing
}
if my answer helps you please mark "Do you like this answer" check Box
Amit ChoudharyPosted Nov 7, 2009, 5:10 AM
Give id to each radio button
then
in your code behind
RadioButton rdPriceThree = (RadioButton)e.Item.FindControl("
find all three control and then
if(rdPriceThree.isChecked)
{
price=rdPriceThree.Text;
}
Enjoy Coding...
====================================
If it helps you please marks it as answer .... :)