Hi,
I wan'na performing some server side operation you need to show "Confirm" box to the client and if the user say OK then we need to fire the server side code again.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nitin BhardwajPosted May 7, 2015, 6:17 AM
Khargesh RajputPosted May 7, 2015, 6:09 AM
visit above link and
here you can see modal popup
mpe
on code behind where you want to show confirmation box
write
mpe.Show();
Rajeesh MenothPosted May 7, 2015, 6:06 AM
Write like this..
ScriptManager.RegisterStartupScript(this, this.GetType(), "Messagebox", "alert('Record Deleted successfully.Note: This tab is now getting close');", true);
Nitin BhardwajPosted May 7, 2015, 5:25 AM
Rajeesh MenothPosted May 7, 2015, 4:47 AM
.aspx code
<asp:Button ID="btnCall" runat="server" Text="Click Me!" OnClick="btnCall_Click" />
c#
protected void btnCall_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "CallConfirmBox", "CallConfirmBox();", true);
}
Ref : http://www.webblogsforyou.com/how-to-show-confirm-message-box-from-code-behind-asp-net/