Hi friends,
i would like to know all about the use of the tool called RadioButtonList, especially how to use a value selected from that radioButtonList to set for example the next textBox ReadOnly (if radioButtonList_name is selected then textbox_name.ReadOnly=true)!
so Please help me I need it quickly!
THANKS A LOT!
kamonyo ricPosted Nov 30, 2007, 3:31 AM
Thanks a lot friends,
It has been a pleasure to be helped by you.
The problem was in my SQL Server 2005 Components installation.
Some components were missing.
Thanks again.
Best regards,
K.Ric.
kamonyo ricPosted Nov 29, 2007, 12:58 AM
THANKS A LOT MY FRIEND,
IT HAS BEEN SO HELPFUL!
I HOPE IT IS THE SAME AS CHECKBOXLIST!
SEE YOU !
P.S:
But I have another problem with my aspnet_regsql command in Visual Studio Cross Tools Command Prompt .
When I try to execute that command the wizard displays a messageBox with the error message :"Failed to query a list of database names from the SQL Server . Invalid object name 'sysdatabases'."
So please if you are again able to help me, tell me what is wrong with my Visual Studio or my SQL? Is it a problem of bad installation of my VS2005?
Best regards,
K.Ric.
chanchal Abraham CheeranPosted Nov 28, 2007, 4:47 AM
Hi,
To make the textbox readonly when you select 'single' from the radiobutton list , you need to follow the following code
you need to write the code in RadioButtonList1_SelectedIndexChanged()
if(RadioButtonList1.SelectedItem.Text=="single")
{
TextBox1.ReadOnly=true;
}
else
{
TextBox1.ReadOnly=false;
}
this is the C# code
kamonyo ricPosted Nov 25, 2007, 3:07 AM
Thx Mr Rakrus,
But I would like to know how to do that with only one value!!
e.g: a RadioButtonList with 3 values (married,single,divorced) and a textBox(HusbandName), I would like to set that RadioButtonList so that When I select the radioButton "single", the textBox(HusbandName) is set readOnly!
Please Help me,
Thx a lot!
RakrusPosted Nov 13, 2007, 11:45 PM
Hi,
In the design mode of RadioButtonList double click on RadioButtonList then it takes you into code behind file with event "RadioButtonListName_SelectedIndexChanged".Here you can set textbox as readonly.
Note:Make sure that for RadioButtonList property AutoPostBack is True