【发布时间】:2010-07-15 04:49:35
【问题描述】:
我的 url 工作正常,因为我可以进入控件正确的方法但是..我如何将状态名称从 url 读取到视图中?
我的网址:http://localhost:10860/Listings/Arizona/page1
我的看法:
>" %><h2>Test BY STATE</h2>
<%
LOTW.Models.ListingRepository dr = new LOTW.Models.ListingRepository();
ListViewListings.DataSource = dr.GetByStateName(???? I can hard code "Arizona" and this works???????); // how do i grab the 'Arizona' from the url? Reqquest.Querystring doesn't work?
ListViewListings.DataBind();
%>
<%--Define the table headers to work with the tablesorter--%>
<asp:ListView runat="server" ID="ListViewListings">
<LayoutTemplate>
<table id="ListViewListings" class="tablesorter">
<thead>
<tr>.....
【问题讨论】:
标签: asp.net-mvc-2