Radwindow from code behind

2 posts, 0 answers
  1. Azees
    Azees avatar
    33 posts
    Member since:
    May 2008

    Posted 05 Nov 2009 Link to this post

    Hi

           I am using Telerikt  version 2009.1.402.20 product
           Now  iam using normal java script alert . i save some value to to  DB after that i show Like Record added succfully in alert
          using following coding

            

     

    virtual protected void GenerateScriptToRedirectHomePage(string errorMessage, bool isRedirect)

     

    {

     

    StringBuilder RedirectPage = new StringBuilder("");

     

    RedirectPage.Append(

    "<script language=\"javascript\">\n window.onload = RedirectPage;\n function RedirectPage() {");

     

    RedirectPage.Append(

    "alert(\"" + errorMessage + "\");");

     

     

    if (isRedirect)

     

    {

    RedirectPage.Append(

    "location.href = \"" + _Referer + "\";");

     

     

     

    }

     

    RedirectPage.Append(

    "} </script>");

     

    Page.ClientScript.RegisterClientScriptBlock(GetPageType(),

    "RedirectPage", RedirectPage.ToString());

     

    }


    once i submit the data to db after that i will call GenerateScriptToRedirectHomePage("Record submitted",true)  function
    What i want is instead of normal alert i need rad alert so how to i change my code

    Regards,
    azees
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Nov 2009 Link to this post

    Hi Azees,

    The following KB Article will be of help to show radalert from code behind.
    Please go through this: Calling radalert from codebehind (all versions of RadWindow)

    -Shinu.
Back to Top