I am using a user control (.ascx) as below
<div class="ui-widget" id="w_instruction">
<div class="ui-state-instruction ui-corner-all w-msg">
<a id="btn_instruction_close" class="ui-dialog-titlebar-close ui-corner-all" href="#" style="float:right;"><img src="../../Images/i_close_blue.png" border="0"/></a>
<img src="../../Images/i_info_24.png" align="absmiddle"/>
<span id="i_msg"></span>
</div>
</div> // this code goes in to instruction.ascx
In my aspx page I am using this user control like below.
<%Html.RenderPartial("Instruction"); %>
and using jquery I am changing the message in the div.
<script type="text/javascript">
$("#i_msg").text("Please Enter the Infringement Details.");
</script>
It was working fine. But now I want to use this user control at two different places in a page. I need some way to differentiate the user control at both places. Any thougth process is welcome.
NOTE- I am using ASP.net MVC 2 application