However, if you are using an ASP.NET Master Page and would like to retrieve the ClientId of a control using jQuery, then here's how to do so:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#<%=RadioButtonList1.ClientID %>").hide('slow');
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Value="Ten"></asp:ListItem>
<asp:ListItem Value="Twenty"></asp:ListItem>
<asp:ListItem Value="Thirty"></asp:ListItem>
<asp:ListItem Value="Forty"></asp:ListItem>
</asp:RadioButtonList>
The example shown above fetches the ClientId of the RadioButtonList and hides it using jQuery
Bookmark this link on del.icio.us (saved by 0 users)
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |





comments
0 Responses to "Get the Client ID of an ASP.NET Control in jQuery"Post a Comment