This is a migrated thread and some comments may be shown as answers.

RadConfirm from C# or similar ex JavaScript

1 Answer 98 Views
Window
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 19 Oct 2009, 04:20 PM
Hi All,

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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Oct 2009, 04:20 AM
Hi Neal,

Checkout the KB Article which shows how to Call radalert from codebehind. You can use same approach in order to show radconfirm from server side.

If you want to retrieve the confirm result on server, then you need to make a postback to the server. This approach is described in following forum. I hope this would be of help.
Confirm Box and Result in Code-behind

-Shinu.
Tags
Window
Asked by
Neal
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or