mercredi 22 juillet 2015

How to pass a hidden variable value to href onclick function

I have a hidden variable which stores an ID. In another view i have href tag from which I am calling a function with with I need to send this ID as a paramater.

my hidden variable:

<input type="hidden" id="CID" value="@Model.CID">

< a href="#!" onclick="openDlg('@item.Name', 'here i want that hidden variable value'") >/<a>

Please help

Aucun commentaire:

Enregistrer un commentaire