Hi All,
I want to show confirm message at server side , for that i have write this code
protected void btnSubmit_Click(object sender, EventArgs e)
{
// here goes some code
now i am opening confirm dialoge
string str = "No Paid Leaves Left , Press OK For Without Pay?";
this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval('" + str + "');", true);
lblMessage.Text = hidCount.Value;
if i get hidCount.Value > 0 then i want to proceed further code
but i always get 0 value... i am setting ok button click value to hidden field using javascript
like this
function ConfirmApproval(objMsg)
{
if(confirm(objMsg))
{
document.getElementById("<%=this.hidCount.ClientID%>").value="1"
return true;
}
else
document.getElementById("<%=this.hidCount.ClientID%>").value = "0"
return false;
}
what is going run ?
i have also use ScriptManager.RegisterStartupScript for confirm but it always execute at the end of code ..