Sourabh Dhiman

Sourabh Dhiman

  • 1.9k
  • 49
  • 1k

How to set value in hidden field.

Apr 18 2021 5:06 PM
This is my code
$(document).ready(function () {
$('li').on('click', function () {
var id = $(this).attr('id');
alert(id);
//$("#HiddenFieldID").val("id");
var Ids = $("#texens").val("id");
alert(Ids);
how to set id value in hidden field and how to get this id value in c# code.
<input type="hidden" id="texens" name="user" value="texens" />
 
i have try this code and check alert object object display 

Answers (1)