Nate Pet
Nate Pet

Reputation: 46322

MVC razor @Item.ID

I have the following code that has @item.ID from razor:

    <a href="#" id="deleteitem(@item.ID)">Delete</a>

When I do view source, it shows up as deleteitem(766). Note that I do not want it to show up with the ( ). I like it to show as deleteitem766

If I do the following

    <a href="#" id="[email protected]">Delete</a>

it does not recognize @item.ID value.

Upvotes: 2

Views: 631

Answers (1)

Jason Meckley
Jason Meckley

Reputation: 7591

<a href="#" id="deleteitem@(item.ID)">Delete</a>

Upvotes: 3

Related Questions