This statement does not output anything since you did not specify a value for:
@Html.Label("", new { id="txtStatus1" })
If you change it to give it a value of ie
@Html.Label("a", new { id="txtStatus1" })
He outputs this:
<label for="a" id="txtStatus1">a</label>
Sridhar R is correct, you can use text to set it like this:
$('#txtStatus1').text('this')
http://jsfiddle.net/bk8KZ/
You may need to add quotation marks and output around the argument if it is being sent from your model i.e.
$('#txtStatus1').val('@Model.TicketStatus');
What is TicketStatus?
source
share