how to check if the Radbutton clicked

2 posts, 0 answers
  1. Avihai
    Avihai avatar
    21 posts
    Member since:
    Aug 2013

    Posted 23 Dec 2013 Link to this post

    Hello all,

    I have a little problem: I have a modal popup that opens whenever the user click radbutton..I'm trying to open the modal popup from the code behind if the user click on the button how can I check if the user click on the button from the code behind?

    (I don't want to use JS front code to open the modal popup)

    *************code behind***********

     Protected Sub GenerateLinks()

            If Not String.IsNullOrEmpty(btnAddNewPerson.?????) Then

                ' ''Open RadWindow

                Dim script As String = "function f(){$find(""" + modalPopup.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"

                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)

                Exit Sub

            End If

    End Sub

    ***********aspx code***********

     <telerik:RadButton ID="btnAddNewPerson" runat="server" Visible="false"  ClientIDMode="Static" Text="Add Person" AutoPostBack="false" OnClientClicking="OnClientClicking"/>

                                        <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4" />


    ******JS function*********

     function OnClientClicking(button, args) {

                    window.location = button.get_navigateUrl();



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

    Posted 25 Dec 2013 Link to this post

    Hi Avihai,

    I guess that you want to show a RadWindow modal popup on the Button OnClick event. Please have a look into the sample code snippet which works fine at my end.

    <telerik:RadButton ID="RadButton1" runat="server" Text="Open ModalPopUP" OnClick="RadButton1_Click">
    <telerik:RadWindow ID="ModalPopUp" runat="server">

    protected void RadButton1_Click(object sender, EventArgs e)
        ModalPopUp.VisibleOnPageLoad = true;

    Let me know if you have any concern.
  3. DevCraft R3 2016 release webinar banner
Back to Top