I
Imran Aziz
Hello All,
I have a delete link on my page, which when clicks calls the URL for
deletion, in ASP we use to create a java script confirm box to confirm
delete, how can that be done in ASP? Say if I use an ASP link control , or
if I use a html anchor link.
This is how I am trying to do it
<script language="javascript">
function ConfirmDelete(nChannelID)
{
if (confirm("Are you sure you want to delete this source?")
{
return true;
}
else
{
return false;
}
}
</script>
<a href="viewsources.aspx?action=del&nChannelID=<%#
DataBinder.Eval(Container.DataItem, "nChannelID") %>" onclick="return
ConfirmDelete('<%# DataBinder.Eval(Container.DataItem, "nChannelID")
%>del</a>
Please suggest, thanks a lot.
Imran.
I have a delete link on my page, which when clicks calls the URL for
deletion, in ASP we use to create a java script confirm box to confirm
delete, how can that be done in ASP? Say if I use an ASP link control , or
if I use a html anchor link.
This is how I am trying to do it
<script language="javascript">
function ConfirmDelete(nChannelID)
{
if (confirm("Are you sure you want to delete this source?")
{
return true;
}
else
{
return false;
}
}
</script>
<a href="viewsources.aspx?action=del&nChannelID=<%#
DataBinder.Eval(Container.DataItem, "nChannelID") %>" onclick="return
ConfirmDelete('<%# DataBinder.Eval(Container.DataItem, "nChannelID")
%>del</a>
Please suggest, thanks a lot.
Imran.