RadConfirm from C# or similar ex JavaScript

2 posts, 0 answers
  1. Neal
    Neal avatar
    114 posts
    Member since:
    Apr 2008

    Posted 19 Oct 2009 Link to this post

    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"))




    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()







    '<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 ???


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Oct 2009 Link to this post

    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

Back to Top