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

How can i use radconfirm through server side.

3 Answers 463 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chandan Kumar
Top achievements
Rank 1
Chandan Kumar asked on 05 Oct 2010, 07:22 AM
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
             






3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Oct 2010, 08:11 AM
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.
0
Chandan Kumar
Top achievements
Rank 1
answered on 05 Oct 2010, 09:45 AM
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.
0
Princy
Top achievements
Rank 2
answered on 23 Jul 2012, 07:05 AM
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.
Tags
Window
Asked by
Chandan Kumar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Chandan Kumar
Top achievements
Rank 1
Share this question
or