I need to have a Confirm window, driven from C# code behind.
I have tried (from within a C# function)
if (!ClientScript.IsStartupScriptRegistered("mytest"))
{
ClientScript.RegisterStartupScript(
typeof(Page), "mytest",
"<script>radconfirm('Do you want to Create a Hotspot Icon? ', 'confirmCallBackFn()');</script>");
}
but to no avail.
unfortunately it has to happen from this function to determine which option / functions to perform (saving of either jotspots on an asp.map map or its coordinates)
HTML java script is
function confirmCallBackFn(arg)
{
document.form1.HSpot.value = arg;
}
Also tried invoking the java scipt function from code without using client register script or Clientregisterstartup script, but no go.
function hi()
{
alert(
"..");
radconfirm(
'<h3 style=\'color: #333399;\'>Do You want to create a hotspot?</h3>', confirmCallBackFn, 330, 100, null,'Create Hotspot or Get LatLon co-ords');
return false;
}
Using ASP.Net 2 and Telerik v 2009.1
If I can get the return variable in C# i'm ok, but how to ???
Thx
Neal