Hi
I am using group radiobuttons, when I click clear button all controls are come to initialstate but these group buttons not cleared.
My requirement is when I click clear button all radiobuttons are also come to uncheck state.
I have written for uncheck radiobutton
RadioButton.ToggleState = ToggleState.Off;
Any one can tel me how to clear(uncheck) all RadioButtons in that Gorup.
Loading
jayaramPosted Sep 14, 2011, 4:28 AM
Prasant JinagaPosted Sep 14, 2011, 12:38 AM
Check the Below Code..
Thanks,
Prasant
Satyapriya NayakPosted Sep 13, 2011, 11:23 AM
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Default2 : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
if (RadioButton1.Checked == false || RadioButton2.Checked == false || RadioButton3.Checked == false)
{
RadioButton1.Checked = true;
RadioButton2.Checked = true;
RadioButton3.Checked = true;
}
else
{
RadioButton1.Checked = false;
RadioButton2.Checked = false;
RadioButton3.Checked = false;
}
}
}
Thanks
If this post helps you mark it as answer