后台:写反了
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string str1=lanqiu.Text;
string str2 = zuqiu.Text;
string str3 = taiqiu.Text;
if(lanqiu.Checked&&zuqiu.Checked&&taiqiu.Checked){
chushi.Text = "你的兴趣是:" + str1+"和"+str2+"和"+str3;
}
else if(lanqiu.Checked&&zuqiu.Checked){
chushi.Text = "你的兴趣是:" + str1 + "和" + str2;
}
else if (zuqiu.Checked && taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str2 + "和" + str3;
}
else if (lanqiu.Checked && taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str1 + "和" + str3;
}
else if (lanqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str1;
}
else if (zuqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str2;
}
else if (taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str3;
}
else { chushi.Text = "你的兴趣太少了"; };
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string str1=lanqiu.Text;
string str2 = zuqiu.Text;
string str3 = taiqiu.Text;
if(lanqiu.Checked&&zuqiu.Checked&&taiqiu.Checked){
chushi.Text = "你的兴趣是:" + str1+"和"+str2+"和"+str3;
}
else if(lanqiu.Checked&&zuqiu.Checked){
chushi.Text = "你的兴趣是:" + str1 + "和" + str2;
}
else if (zuqiu.Checked && taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str2 + "和" + str3;
}
else if (lanqiu.Checked && taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str1 + "和" + str3;
}
else if (lanqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str1;
}
else if (zuqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str2;
}
else if (taiqiu.Checked)
{
chushi.Text = "你的兴趣是:" + str3;
}
else { chushi.Text = "你的兴趣太少了"; };
}
}