Monday, 26 August 2013

how to get label id in asp.net for using in jquery,?

how to get label id in asp.net for using in jquery,?

I am not getting label id in jquery code , i use anchor tag , it is
working , the text changes to today's date on page load , but when i apply
it to label control of asp.net , it doesn't work , search may pages on web
, but doesn't get proper solution how to change text of label using java
script or jquery , is here anybody can solve it.
here is the code to look out .
<div>
<div>
<table class="foruploadtable">
<tr>
<td>
<span class="foruploadtabletitle" >Share From Here .</span>
<hr />
</td>
</tr>
<tr>
<td>Max Size 1MB :</td><td>
<asp:FileUpload ID="FileUpload1" ToolTip="Select File
By Clicking Browse ." CssClass="foruploadtableupload"
runat="server" /></td>
</tr>
<tr>
<td>
<asp:Button ID="b1" runat="server"
CssClass="foruploadtablebutton" ToolTip="Click Here
To Upload." Text="Upload." OnClick="b1_Click" />
</td>
<td>
<asp:Label ID="Label1" runat="server"
Text="Label"></asp:Label>
<a id="me">hello</a>
</td>
</tr>
</table>
</div>
</div>
<script>
$(document).ready(function () {
var say = $('#me').text();
var date = new Date();
$('#me').text(date.getDate());
$('#Label1').text(date.getDate());
// alert(date.getDate());
});
</script>

No comments:

Post a Comment