In your first page you can store result of your program logic to ViewState...
protected void btn1_click(object sender, EventArgs e)
{
this.ViewState["behavior"] = "update";
}
protected void btn1_click(object sender, EventArgs e)
{
this.ViewState["behavior"] = "insert";
}
...and later you send that result as parameter via QueryString to you second page.
if(ViewState["behavior"] != null)
{
Response.Redirect("page2Url goes here?Behavior=" + ViewState["behavior"].ToString());
}
else
{
}
With information sent as parameter you can easily in Load event of second page set desired behavior/property values on targeted controls.
protected void Page2_Load(object sender, EventArgs e)
{
if(!this.IsPostBack)
{
string arg = null;
arg = Request.QueryString["behavior"];
if(arg != null)
{
btnUpdate.Enabled = arg == "update";
btnInsert.Enabled = arg == "insert";
myTextBox.Text = btnInsert.Enabled ? "" : "bind some data on your own!";
}
}
}