call javascript from code behind to show and hide progress bar image
Hi To all,
I am new to this site, and looking for any support you can give to me about my concern.
I want to know how can I call the java script function of show and hide progress bar image when needed.
I want to display the progress bar image running and doing some server side task like search and save, and then, after the task, i will hide the progress bar image right away.
Here is the javascript attached on the aspx
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
function beginReq(sender, args)
{
$find(ModalProgress).show();
}
function endReq(sender, args)
{
$find(ModalProgress).hide();
}
here is my server side
protected void Button1_Click(object sender, EventArgs e)
{
I want to call the beginReq js - How?
I will do some searching .net script here
After the search, I want to call the endReq js - How?
}
Bookmarks