How can i use radconfirm through server side.

4 posts, 0 answers
  1. Chandan Kumar
    Chandan Kumar avatar
    68 posts
    Member since:
    Mar 2010

    Posted 05 Oct 2010 Link to this post

    Hello Sir,

    How can i use radconfirm through server side.

    means like this
    i have some condition
    if(str==4)
    {
              then here i want to use radconfrm ("Are U want to save");
              if Yes then
               {
                       SAVE();
               }
    }
    i want to do some thing like this. Please help me.'
    Thanks
    Chandan Kumar
                 






  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Oct 2010 Link to this post

    Hello,


    Here I found forum which discussed similar scenario. I hope this would help you.
    http://www.telerik.com/community/forums/aspnet-ajax/window/confirm-box-and-result-in-code-behind.aspx#729933

    Thanks,
    Princy.
  3. Chandan Kumar
    Chandan Kumar avatar
    68 posts
    Member since:
    Mar 2010

    Posted 05 Oct 2010 Link to this post

    Hello Sir,

    your given link has no code for related my problem.
    i want to use rad alert using server side after checking some condition means when i fetch data from database and if its value is male then i want to give rad alert this is just example.

    So please give me solution.

    Thanks
    Chandan.
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Jul 2012 Link to this post

    Hi Chandran,

    Try the following code to achieve your scenario.

    ASPX:
    <asp:Button ID="Button1" runat="server" CssClass="buttons"  Text="Button" onclick="Button1_Click" />
    <asp:Button ID="Button2" runat="server" CssClass="buttons"  Text="Button" onclick="Button2_Click" />

    CSS:
    <style type="text/css">
     .buttons
     {
      display:none;
     }
    </style>

    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
     if(str==4)
     {
       string script = "radconfirm('Are you sure!?', confirmCallBackFn);";
       ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RadButton1", script, true);
     }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
      SAVE();
    }

    Javascript:
    function confirmCallBackFn(arg)
    {
     if (arg == true)
     {
      document.getElementById("Button1").click();
     }
    }

    Thanks,
    Princy.
Back to Top