Sunday, 1 November 2015

Query String Used to Passed Id to the Code behind

Html List

<li id="Link" ><a class="btn-default" href="?id=1">Log off.</a></li>
(key: passed id to the next page )


Code Behind


 protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] == "1")
            {
                logout();
            }

        }

        private void logout()
        {
            //code

        }

No comments:

Post a Comment