Click here to Skip to main content
15,895,876 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
show textbox on selecting radio button
Posted

Good go ahead and implement it.

It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.



For now, Start reading from here and see how OnCheckedChanged event can be used:
How to use OnCheckedChanged event in RadioButton [^]
MSDN: RadioButton Class[^]
 
Share this answer
 
Comments
sandeep nagabhairava 15-Jul-12 9:40am    
well sandeep, catch my 5!
Hello My dear Friend use this, it will be helpful.

Design Page aspx
================

XML
<asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="true"
            oncheckedchanged="RadioButton1_CheckedChanged"/>

        <asp:TextBox ID="TextBox1" runat="server" Visible="false" ></asp:TextBox>



Code Page cs
============


C#
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 RadioButton_Textbox : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    {

        if(RadioButton1.Checked)
        {
            TextBox1.Visible = true;
        }
        else
        {
            TextBox1.Visible = false;

        }
    }
}



BYE.............
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900