Exemplo n.º 1
0
        /// <summary>
        /// Method Name:BtnSubmit_Click
        /// Description: On button click store the session value and display in other textbox
        /// Author:Bhumi
        /// Created On:16/6/2015
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            ConstantMessages   objconstant;
            Class1_DefaultForm objclass1;//object declaration

            try
            {
                Session["sessionName"] = TxtName.Text;//store value of name in session variable
                // Increment counter session variable.
                Session["SubmitClick"] = (int)Session["SubmitClick"] + 1;
                LblCounter.Text        = Session["SubmitClick"].ToString();

                //Number Of counter page visited
                LblCounter1.Text = Application["PageClick"].ToString();

                objclass1             = new Class1_DefaultForm();
                objclass1.Name        = Session["sessionName"].ToString(); //Use of Class Property
                TxtPropertyValue.Text = objclass1.Name;                    //Store Property Value
            }
            catch (Exception)
            {
                objconstant = new ConstantMessages();
                Response.Redirect(objconstant.strerrorpage);
            }
            finally
            {
                objconstant = null;
                objclass1   = null;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Method Name:BtnSubmit_Click
        /// Description: On button click store the session value and display in other textbox
        /// Author:Bhumi
        /// Created On:16/6/2015
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            ConstantMessages objconstant;

            try
            {
                Session["sessionName"] = TxtName.Text;                      //store value of name in session variable
                TxtSessionValue.Text   = Session["sessionName"].ToString(); //value of session variable in other Textbox

                // Increment counter session variable.
                Session["SubmitClick"] = (int)Session["SubmitClick"] + 1;
                LblCounter.Text        = Session["SubmitClick"].ToString();

                //Number Of counter page visited
                LblCounter1.Text = Application["PageClick"].ToString();
            }
            catch (Exception)
            {
                objconstant = new ConstantMessages();
                Response.Redirect(objconstant.strerrorpage);
            }
            finally
            {
                objconstant = null;
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objconstant = new ConstantMessages();
     Response.Write(objconstant.strerrormessage);
 }