Dynamic URL to the link tag
I have coding like this in my asp.net web form application [asp.net 4.0]
<ul data-role="listview" data-theme="g">
<% foreach (var item in CustomerOrderList())
{ %>
<li> Order Id:<a href="#" style="display:开发者_如何学编程inline-block; vertical-align:middle;"><%= item.idOrder%> </a>
<table >
<tr>
<td >
Total Price: <%= item.totalPrice%> ||
</td>
<td >
Requested Date: <%= Convert.ToDateTime(item.reqDate) %>
</td>
</tr>
</table>
</li>
<% } %>
</ul>
at href I want to generate the url like this
href="somepage.aspx?Id= item.Id"
Means "somepage.aspx?Id=" this will be constant and only querystring parameter will be changed. How can I do that?
<a href='somepage.aspx?Id=<%= item.id%>' style="display:inline-block; vertical-align:middle;"><%= item.idOrder%> </a>
精彩评论