Пример #1
0
 /// <summary>
 /// Method Name:Page_Load
 /// Description:Get the Value From Querystring and store into textboxes
 /// Author:Bhumi
 /// Created On:22/6/2015
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         //get the value from querystring
         TxtName.Text     = Request.QueryString["Name"];
         TxtSex.Text      = Request.QueryString["Sex"];
         TxtEmail.Text    = Request.QueryString["Email"];
         TxtDOB.Text      = Request.QueryString["DOB"];
         TxtFaxNo.Text    = Request.QueryString["FaxNo"];
         TxtMarried.Text  = Request.QueryString["Married"];
         QuerystringVal   = Request.QueryString["LanguageKnown"];
         splitVal         = QuerystringVal.Split(',');//Split using delimeter
         TxtLanguage.Text = string.Join(",", splitVal);
     }
     catch (Exception)
     {
         objconstant = new ConstantMessages();
         Response.Redirect(objconstant.strUserDetailspage);
     }
     finally
     {
         objconstant = null;
         splitVal    = null;
     }
 }
Пример #2
0
 /// <summary>
 /// Method Name:BtnSubmit_Click
 /// Description:Submit Button Click Event
 /// Author:Bhumi
 /// Created on:22/6/2015
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void BtnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i <= LstLanguage.Items.Count - 1; i++)
         {
             if (LstLanguage.Items[i].Selected)
             {
                 selectText += LstLanguage.Items[i].Text + " ";
             }
         }
         //passing Values in querystring
         objconstant = new ConstantMessages();
         Response.Redirect(objconstant.strinformationpage + "?Name=" + TxtName.Text + "&Sex=" + TxtSex.Text + "&Email=" + TxtEmail.Text + "&DOB=" + TxtDOB.Text + "&FaxNo=" + TxtFaxNo.Text + "&Married=" + DdlMarried.SelectedItem.Text + "&LanguageKnown=" + selectText);
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
     finally
     {
         objconstant = null;
     }
 }