I have this model
@model WebApplication1.Models.Person which has an
Id data. I want to pass
<a href="#" onclick=myFunction(idGoesHere)>.
I tried putting
@Model.id or passing the value of
@Model.id to another variable, but still it doesn't work. Any help would be appreciated.
Your call to your JS function will look like this:
<a href="#" onclick="myFunction('@Model.id')"> </a>
This will send the current
id in concern to your JS function.
- → How to Fire Resize event after all images resize
- → URL routing requires /Home/Page?page=1 instead of /Home/Page/1
- → Getting right encoding from HTTPContext
- → How to create a site map using DNN and C#
- → I want integrate shopify into my mvc 4 c# application
- → Bootstrap Nav Collapse via Data Attributes Not Working
- → Shopify api updating variants returned error
- → ASP.NET C# SEO for each product on detail page on my ECOMMERCE site
- → SEO Meta Tags From Behind Code - C#
- → How to implement search with two terms for a collection?