예제 #1
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 <= CblItems.Items.Count - 1; i++)
         {
             if (CblItems.Items[i].Selected)
             {
                 selectText += CblItems.Items[i].Text + ",";//Get the value of checked checkboxes
             }
         }
         if (selectText == "")
         {
             objconstant = new ConstantMessages();
             ClientScript.RegisterStartupScript(this.GetType(), "msgbox", "alert('" + objconstant.stralertitemnotselected + "');", true);
         }
         else
         {
             //passing Values in querystring
             objconstant = new ConstantMessages();
             Response.Redirect(objconstant.strtopicspage + "?Selected=" + selectText);
         }
     }
     catch (Exception)
     {
         //objconstant = new ConstantMessages();
         //Response.Redirect(objconstant.strErrorPage);//Error
     }
     finally
     {
         objconstant = null;
     }
 }
예제 #2
0
 /// <summary>
 /// Method Name:Page_Load
 /// Description:Get the Value From Querystring and store into dynamic hyperlinks
 /// 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
     {
         objconstant    = new ConstantMessages();
         QuerystringVal = Request.QueryString["Selected"];
         splitVal       = QuerystringVal.Split(',');//Split using delimeter
         for (int i = 0; i < splitVal.Length; i++)
         {
             // Create new row and add it to the table.
             tRow = new TableRow();
             TblDynamic.Rows.Add(tRow);
             tCell = new TableCell();
             tRow.Cells.Add(tCell);//ADD Cell
             Lnkbtn               = new LinkButton();
             Lnkbtn.Text          = splitVal[i];
             Lnkbtn.OnClientClick = "window.open('" + objconstant.strChoicepage + "')";
             tCell.Controls.Add(Lnkbtn);//Add Hyperlink in cell
         }
     }
     catch (Exception)
     {
         objconstant = new ConstantMessages();
         Response.Redirect(objconstant.strchoicepage);
     }
     finally
     {
         objconstant = null;
         Lnkbtn      = null;
         tRow        = null;
         tCell       = null;
     }
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objconstant = new ConstantMessages();
     Response.Write(objconstant.strErrormessage);
 }