Nitish Nitish - 2 years ago 81
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

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