i have a update button for update in update page when i finish editing and click update button then the page is redirected to home page and in home page i want a label message saying "update successful" to be appear (not a message box).
if anyone have done this before, please help me with example
thank you
prasanna
Naresh AvariPosted Aug 22, 2012, 3:43 AM
You can do this using QueryString also. Pass query string in ur URL to home page and capture it in page_load of ur home pae.
Use this code where you redirect to home page after update successful.
Response.Redirect("home.aspx?UpdateSuccessful=Yes");
and in page_load of home page:
if(Request.QueryString["UpdateSuccessful"] != null)
{
string updateSuccessful = Request.QueryString["UpdateSuccessful"].ToString();
if(updateSuccessful == "Yes")
{
//Here make visible = true of your label and assign text to your label
lblMsg.Visible = true;
lblMsg.Text = "Update successful";
}
}
}
Hope this helps........
Hemant KumarPosted Aug 22, 2012, 2:59 AM
1. Sending the Result Flag to the other page and showing the Label Message based on the Result Flag.
2.Using Session ,Store the Result Flag in that Session and redirect to the next page.