I have an asp button
<asp:Button ID="btnInbox" runat="server" Text="Inbox" onclick="btnInbox_Click" />
In page load the button is made hidden
btnInbox.Style.Add("display", "none");
in the asp menu item click i'm calling the script as
ScriptManager.RegisterStartupScript(this, this.GetType(), "AlertFunction", "DeleteInboxAlertMessage();", true);
<script language="javascript" type="text/javascript">
function DeleteInboxAlertMessage()
{
if(confirm("Are you sure to delete the record(s)?")== true)
{
//Calling the server side code after confirmation from the user
document.getElementById("btnInbox").click();
}
}
</script>
and in the button click
the delete function is added aslo the grid rebind method is called.
But the delete is occurring but the grid refresh isnt working.
Its entering the NeedDataSource. But the grid is not refreshing.
Plz reply
<asp:Button ID="btnInbox" runat="server" Text="Inbox" onclick="btnInbox_Click" />
In page load the button is made hidden
btnInbox.Style.Add("display", "none");
in the asp menu item click i'm calling the script as
ScriptManager.RegisterStartupScript(this, this.GetType(), "AlertFunction", "DeleteInboxAlertMessage();", true);
<script language="javascript" type="text/javascript">
function DeleteInboxAlertMessage()
{
if(confirm("Are you sure to delete the record(s)?")== true)
{
//Calling the server side code after confirmation from the user
document.getElementById("btnInbox").click();
}
}
</script>
and in the button click
the delete function is added aslo the grid rebind method is called.
But the delete is occurring but the grid refresh isnt working.
Its entering the NeedDataSource. But the grid is not refreshing.
Plz reply