(6.1)--服务器控件应用1.pptVIP

  • 1
  • 0
  • 约小于1千字
  • 约 2页
  • 2023-11-23 发布于陕西
  • 举报
RadioButton和RadioButtonList控件应用示例创建如图所示的页面,在页面中添加2个RadioButton控件用于选择学分,添加1个RadioButtonList控件用于选择课程类别,1个命令按钮和1个标签。单击“确定”按钮后,在标签中显示选定内容;单击“重置”按钮,恢复选定前的状态。 RadioButton和RadioButtonList控件应用示例//为“确定”按钮的单击事件添加代码protected void Button1_Click(object sender, EventArgs e){ if (RadioButton1.Checked) { Label1.Text = 您选择课程是: +RadioButton1.Text; } else if(RadioButton2.Checked) { Label1.Text = 您选择课程是: + RadioButton2.Text; } if (RadioButtonList1.SelectedIndex -1) { Label1.Text += + RadioButtonList1.SelectedValue; }}

文档评论(0)

1亿VIP精品文档

相关文档