本文共 1361 字,大约阅读时间需要 4 分钟。
webform1.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="dynamicweb4_2.WebForm1" %>
webform1.aspx.cs
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace dynamicweb4_2{ public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnSubmit_Click(object sender, EventArgs e) { if (rbMale.Checked) { lblTips.Text = "性别:男"; } else { lblTips.Text = "性别:女"; } if (rblOrigin.SelectedIndex != -1) { lblTips.Text += "生源地:" + rblOrigin.SelectedItem.Text + ""; } else { lblTips.Text += "生源地:未经性选择"; } } }}
转载地址:http://vcrm.baihongyu.com/