问题描述
我正在创建其中具有InsertQuestion.aspx页面的在线考试项目(Asp.Net).
我有1个textBox和1个Button ant面板Control.
在点击按钮时,我要动态添加单选按钮&在按钮的每次单击事件上将Radiobutton的文本设置为textBox的文本
并添加到面板控件
请告诉我解决方案.
我尝试过的事情:
AddButton_Click()
{
RadioButton rb =新的RadioButton();
rb.Text = Textbox1.Text;
Panel1.controls.add(rb);
}
I am Creating Online Exam Project(Asp.Net) in which i have InsertQuestion.aspx Page.
I have 1 textBox and 1 Button ant panel Control.
On Click Of a Button i want to add a Radiobutton dynamically & set the text of Radiobutton as text Of textBox on Every Click Event of a button
And add to a panel control
please tell me Solution.
What I have tried:
AddButton_Click()
{
RadioButton rb = new RadioButton();
rb.Text = Textbox1.Text;
Panel1.controls.add(rb);
}
推荐答案
这篇关于如何在按钮的每次单击事件上添加多个单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!