Ejemplo n.º 1
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        if (fuimage.PostedFile.FileName != "")
        {
            fuimage.SaveAs(Request.PhysicalApplicationPath + "./upload/" + fuimage.FileName);
            image = fuimage.FileName;
        }
        string hobbies = "";

        for (int i = 0; i < chkhobbies.Items.Count; i++)
        {
            if (chkhobbies.Items[i].Selected)
            {
                if (hobbies == "")
                {
                    hobbies = chkhobbies.Items[i].Value;
                }
                else
                {
                    hobbies += "," + chkhobbies.Items[i].Value;
                }
            }
        }
        linqobj.InsertRegistraion(txtfirstname.Text, txtlastname.Text, txtemailid.Text, txtmobileno.Text, RBList.SelectedItem.Text,
                                  Convert.ToInt32(ddlcountry.SelectedValue), Convert.ToInt32(ddlstate.SelectedValue), 0, hobbies, image);
        linqobj.SubmitChanges();
        fillregistraion();
        ClientScript.RegisterStartupScript(this.GetType(), "Success", "<script type='text/javascript'>alert('** Thanks For Registration **');window.location='RegistraionForm.aspx';</script>'");
    }