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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajeesh MenothRank #118 · 18.4K reputationPosted May 7, 2015, 12:47 AM EDT
.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/
Nitin BhardwajRank #139 · 16.1K reputationPosted May 7, 2015, 1:25 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted May 7, 2015, 2:06 AM EDT
Write like this..
ScriptManager.RegisterStartupScript(this, this.GetType(), "Messagebox", "alert('Record Deleted successfully.Note: This tab is now getting close');", true);
Khargesh RajputRank #616 · 3.9K reputationPosted May 7, 2015, 2:09 AM EDT
visit above link and
here you can see modal popup
mpe
on code behind where you want to show confirmation box
write
mpe.Show();
Nitin BhardwajRank #139 · 16.1K reputationPosted May 7, 2015, 2:17 AM EDT