Srinivas
Srinivas

Reputation: 2539

ASP.NET: How can i update hidden field in JQuery or Javascript?

I have a hidden field in my view. I have list of strings that i would like to put as comma separated values in to hidden field. I am trying to access the hidden field. Is it possible? Any other best practice?

Upvotes: 0

Views: 130

Answers (2)

bangoo
bangoo

Reputation: 688

Have you tried something like

$('input[name=hiddeninputname]').val(theValue); 

Upvotes: 2

Madhavan NR
Madhavan NR

Reputation: 188

For asp.net hiddenfield use this:

$("[id$=idofthehiddenfield]").val(commaseperatedvalues);

Upvotes: 0

Related Questions