Can we access ASP.Net's web user control 's child controls using javascript

Black Paladin

New Member
I have a web user control. I want to know how to access its child control , using java script, when we use it in another page.Suppose my control is as below:\[code\] <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCS.ascx.cs" Inherits="UCS" %> <asp:panel ID="rbtnPanel" runat="server"> <asp:RadioButton ID="rbtnEn" runat="server" GroupName="scan" Checked="true" Text="Entire" style="margin-left: -7px;"/> <asp:RadioButton ID="rbtnCu" runat="server" GroupName="scan" Text="Custom" style="position: absolute; margin-left: 2px;"/> </asp:panel>\[/code\]update:I have added it in the page as: Try.aspx\[code\] <%@ Register Src="http://stackoverflow.com/questions/15871458/~/UserControls/UCS.ascx" TagName="UCS" TagPrefix="ucSc" %> <table> <tr> <td> <usSc:UCS id="UCS1" runat="server" /> </td> </tr> </table>\[/code\]try.aspx: javascript:\[code\] $(document).ready(function() { setPageLayout(2, 0, true); startTimer(); } function startTimer() { alert(document.getElementById("<%= rbtnCu.ClientID %>").checked); }\[/code\]So if I use this control in another page by registering it. How can I access the RadioButton in that Try.aspx page's javascript section.Thanks in advance!
 
Top