popup server side

4 posts, 0 answers
  1. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 02 Oct 2012 Link to this post

    How to open/popup RadDatePicker from server side?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Oct 2012 Link to this post

    Hi Kjell,

    Try the following code to achieve your scenario.

    C#:
    protected void Button1_Click(object sender, EventArgs e)
    {
      string script = "function f(){$find(\"" + RadDatePicker1.ClientID + "\").showPopup(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
      ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RadDatePicker", script, true);
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 03 Oct 2012 Link to this post

    Can I get the example written for vb?
    I tried to convert it converter.telerik.com but got error message ....
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Oct 2012 Link to this post

    Hi Kjell,

    Here is the code in VB.

    VB:
    Protected Sub Button1_Click(sender As Object, e As EventArgs)
        Dim script As String = "function f(){$find(""" + RadDatePicker1.ClientID + """).showPopup(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
        ScriptManager.RegisterStartupScript(Page, Page.[GetType](), "RadDatePicker", script, True)
    End Sub

    Hope this helps.

    Thanks,
    Shinu.
Back to Top