Nitish Nitish - 1 year ago 57
C# Question

Set model property in jQuery

I am trying to set Model property Id as follows :

'<%= Model.Id %>' = $("#Id");


But getting error in Firebug :

Invalid left-hand side in assignment.


How to set
Model.Id
?

Answer Source

if you write in this way

'<%= Model.Id %>' = $("#Id");

so it is not possible to set any var to '56' (For example let be 56), so you try set value to number...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download