Click here to Skip to main content
15,891,851 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
im working on a web app is based on masterpage so i have my panel on the masterpage and a dummy button but what i need to know is how can i make the modalpopup get display from checking a radiobutton??
i tried this but now the radiobutton dont work!
and my modalpopupextender is using a dummybutton
ASP.NET
<asp:RadioButton ID="rbtn_si1" runat="server" Style="position:absolute; top: 36px; left: 410px;" Text="Si" OnClick="ShowPopUp(this)"/>
    <script lang="javascript" type="text/javascript">

        function ShowPopUp(obj) {

            if (obj.checked) {
                $find('ModalPopupExtender2').show();
            }
        }
    </script>
Posted
Updated 23-Jul-13 6:10am
v2
Comments
Sergey Alexandrovich Kryukov 23-Jul-13 11:45am    
What's the difference on what even to show a modal popup (I hope you are not using modal popup windows :-)? Anyway, start here: http://whathaveyoutried.com.
—SA
Sergey Alexandrovich Kryukov 23-Jul-13 12:14pm    
Radio button is still a button.
—SA
verasgabriel 23-Jul-13 12:18pm    
the thing is the modalpopupextender is on the masterpage and the radiobutton is on a windows form open in the masterpage at first i tried like a normal button but threw me an error that the extender cant find the radiobutton

1 solution

verasgabriel wrote:
no im using ajax modalpopupextender, i have used before but with a button now with the radiobutton dont know how to put it
Radio button is still a button. It looks like you did the popup mechanically, from someone's code sample, without understanding. Now, it's the time to take you old code and really understand how it works, that will solve your new problem. Radio button will work exactly the same way. You may only need to know the checked status of the radio button. See, for example: http://stackoverflow.com/questions/3869535/how-to-get-the-selected-radio-button-value-using-js[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900