RadButton Call Alert

2 posts, 0 answers
  1. Luffy
    Luffy avatar
    28 posts
    Member since:
    Jun 2011

    Posted 03 Aug 2011 Link to this post

    Hello, what i need for this radalert is when I clicked on the button. If the textbox is nothing, it will alert that textbox is empty and if there's something in the textbox , it will prompt that upload success.

    How can i achieve that? 

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

    Posted 04 Aug 2011 Link to this post

    Hello Sherman,

    You can show radalert and radprompt from server side as shown below.

    C#:
    protected void btnToggle1_Click(object sender, EventArgs e)
    {
      if (txtbox.Text == "")
       {
         RadWindowManager1.RadAlert("TextBox is Empty", 330, 100, "Server RadAlert", "RadalertCallBackFn");
       }
       else
       {
         RadWindowManager1.RadPrompt("Server RadPrompt: Upload Success", "RadPromptCallBackFn", 230, 100, null, "Server RadPrompt", "12");
       }
    }

    Javascript:
    function RadalertCallBackFn(arg)
    {
       radalert("<strong>radalert</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");
    }
    function RadPromptCallBackFn(arg)
    {
       radprompt("<strong>radprompt</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top