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

RadButton Call Alert

1 Answer 73 Views
Button
This is a migrated thread and some comments may be shown as answers.
Luffy
Top achievements
Rank 1
Luffy asked on 03 Aug 2011, 07:35 PM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Aug 2011, 06:34 AM
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.
Tags
Button
Asked by
Luffy
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or