SolutionCottage.com
Posted  22 Mar 2009 - 14:28:29

Category: JavaScript


JQuery select dynamic server controls in ASP.net

Issue:
You want to select controls that run on server that gets a client ID different from what the ID tag says. Something similar co ctl00_myDiv.

Solution:
You can use code similar to this one:

<script type="text/javascript">
$(document).ready(function() {
var paragraph = $('#' + '<%=paragraph.ClientID%>');
paragraph.click(function() {
paragraph.html("Changed");
});
});
</script>








0 comments:








© SolutionCottage 2008-2011 9/26/2017 10:06:57 AM