You can use this way. I'm just giving you hint, don't know your exact scenario.
Javascript:
<script type="text/javascript">
function CallConfirmBox(passedvalue) {
if (confirm("Confirm Proceed Further With " + passedvalue + "?")) {
alert("You pressed OK!");
return true;
} else {
alert("You pressed Cancel!");
return false;
}
}
</script>
.aspx Markup:
<asp:Button ID="btnCall" runat="server" Text="Click Me!" OnClick="btnCall_Click" />
Call it from code-behind: C#
protected void btnCall_Click(object sender, EventArgs e)
{
string myServiceVal = "some value here..";
ScriptManager.RegisterStartupScript(this, this.GetType(), "CallConfirmBox", "CallConfirmBox("'+ myServiceVal +'");", true);
}
Reference:
http://www.aspneto.com/how-to-show-confirm-message-box-from-code-behind-asp-net.html[
^]