开发者

Dynamic URL to the link tag

开发者 https://www.devze.com 2023-03-03 00:24 出处:网络
I have coding like this in my asp.net web form application [asp.net 4.0] <ul data-role=\"listview\" data-theme=\"g\">

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消