using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class About : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ViewState["xx"] = "x";
if (!IsPostBack)
{
ViewState["xx"] = "y";
}
Response.Write(ViewState["xx"]);
}
protected void Button1_Click(object sender, EventArgs e)
{
}
}
in this case first page load return value 'y' ... and when u click the btn than it's return
'x' .....