vishal goyal

vishal goyal

  • 1.7k
  • 76
  • 2k

how to get id on image click inmvc

May 25 2016 1:50 AM
<body>
<div class="container h">
<h2><b>Machines</b></h2>
<div class="row" style="margin-top:10px;margin-left: 10px;">
@{foreach (System.Data.DataRow sp in ViewBag.view.Rows)
{
<div class="col-sm-3 img" >
<h5><p style="margin-left:50px">@sp["Model_Number"].ToString()</p></h5>
<img onmouseover="bigImg(this)" onmouseout="normalImg(this)" src="@sp["Image"].ToString()" style="height:180px;width:170px;border:groove;border-width:2px;border-color:yellow"/>
<p style="margin-left:30px;" >@sp["Manufacture"].ToString()</p>
<input name="id" value="@sp["Machine_Id"].ToString()"/>
</div>}}
</div>
</div>
</body>
 
i want to get id to display image on another page...so on image click how can i get id

Answers (1)