I have two websites with three checkboxes on both of them. The thing i want to do is check a checkbox on the first website and it would show what i have checked on the other site. This works with only one checkbox but as soon as i check more than one box only one shows as checked on the other site. Here is some code:
Website1.aspx (Where they have to be checked)
if (CheckBox1.Checked)
{
Response.Redirect("default.aspx?parm1=true");
}
else if (CheckBox2.Checked)
{
Response.Redirect("default.aspx?parm2=true");
}
else if (CheckBox3.Checked)
{
Response.Redirect("default.aspx?parm3=true");
}
Website2.aspx (where they should show up as checked)
if (Request.QueryString["parm1"] != null)
{
boxreg.Checked = Convert.ToBoolean(Request.QueryString["parm1"]);
}
else if (Request.QueryString["parm2"] != null)
{
boxhand.Checked = Convert.ToBoolean(Request.QueryString["parm2"]);
}
else if (Request.QueryString["parm3"] != null)
{
boxbeslut.Checked = Convert.ToBoolean(Request.QueryString["parm3"]);
}
So the question is how would i go about if i want more than one checked and for it to show up on the other site. If i check only one for now it works but not for more than one.
Aucun commentaire:
Enregistrer un commentaire