Hi Friends
How to display Alert msg in Asp.net Web Application.. ??
i have to delete some Item.
after pressing delete button, it should show alert msg..
if i press yes, it should delete
i have to delete some Item.
after pressing delete button, it should show alert msg..
if i press yes, it should delete
if it is no, then do nothing..
i have delete functions..
i want Alert msg in asp.net as in msgbox in C# ..
i want Alert msg in asp.net as in msgbox in C# ..
pls help me..
Thnks in Advance
Thnks in Advance
Manas MohapatraRank #182 · 13.2K reputationPosted Jul 22, 2015, 10:45 PM EDT
Click the button to display a confirm box.
id="demo">
>Nilesh JadavRank #109 · 20.3K reputationPosted Jul 22, 2015, 10:46 PM EDT
Govinda Rajulu YemineniRank #1,518 · 1K reputationPosted Jul 22, 2015, 10:52 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jul 22, 2015, 11:02 PM EDT
function deleteArticle(hdnPostId, divContainer) {
if (confirm("Are you sure?"))
{
$.ajax({
type: "POST",
url: "TestPage.aspx/DeleteArticle",
data: "{PostId: '" + hdnPostId + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$('#' + divContainer).hide();
},
failure: function (errMsg) {
alert(errMsg);
}
});
}
return false;
}
hypDelete.Attributes.Add("onclick","javascript:deleteArticle('"+hdnPostId.Value+"','"+divContainer.ClientID+"');return false;");
Rajeesh MenothRank #118 · 18.4K reputationPosted Jul 22, 2015, 11:25 PM EDT
Ankit ShuklaRank #2,120 · 672 reputationPosted Jul 22, 2015, 11:29 PM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Jul 23, 2015, 1:03 AM EDT
Govinda Rajulu YemineniRank #1,518 · 1K reputationPosted Jul 23, 2015, 1:08 AM EDT
Murugavel S69 reputationPosted Jul 23, 2015, 12:55 AM EDT
so, how to display confirm msg before deleting item.?
im using
Thanks in Advance
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts