正在将Datagrid绑定到XMLDatasource
本文关键字:XMLDatasource 绑定 Datagrid | 更新日期: 2023-09-27 18:20:11
我正在使用XMLDatasource绑定到数据网格。我还在xsl中使用一个参数进行排序。我的一切都正常,但似乎我必须绑定两次数据才能在排序时正常工作。有人能告诉我为什么吗?这是我的网络表单:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" OnSorting="GridView1_Sorting" OnPageIndexChanging="GridView1_PageIndexChanging" >
<Columns>
<asp:BoundField DataField="ALT-KEY" HeaderText="ALT-KEY" SortExpression="ALT-KEY" />
<asp:BoundField DataField="PARCEL-DISPLAY" HeaderText="PARCEL-DISPLAY" SortExpression="PARCEL-DISPLAY" />
<asp:BoundField DataField="OWNER-NAME" HeaderText="OWNER-NAME" SortExpression="OWNER-NAME" />
<asp:BoundField DataField="SITUS" HeaderText="SITUS" SortExpression="SITUS" />
<asp:BoundField DataField="PARCEL-DESCRIPTION" HeaderText="PARCEL-DESCRIPTION" SortExpression="PARCEL-DESCRIPTION" />
<asp:BoundField DataField="LAST-SALE" HeaderText="LAST-SALE" SortExpression="LAST-SALE" />
<asp:BoundField DataField="LAST-PRICE" HeaderText="LAST-PRICE" SortExpression="LAST-PRICE" />
</Columns>
</asp:GridView>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" ></asp:XmlDataSource>
</form>
</body>
</html>
这是我的代码:使用System.Web.UI.WebControls;
namespace TestGridSort
{
public partial class WebForm1 : System.Web.UI.Page
{
protected string sortExpression = "OWNER-NAME";
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindData();
}
}
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
sortExpression = e.SortExpression;
BindData();
BindData();
}
protected void BindData()
{
GridView1.DataSource = "";
GridView1.DataBind();
XmlDataSource1.DataFile = "";
XmlDataSource1.DataBind();
System.Xml.Xsl.XsltArgumentList xslTransform = new System.Xml.Xsl.XsltArgumentList();
XmlDataSource1.TransformArgumentList = null;
xslTransform.AddParam("sortby", "", sortExpression);
XmlDataSource1.DataFile = "~/App_Data/Parcels.xml";
XmlDataSource1.TransformFile = "~/App_Data/xmlfile1.xsl";
XmlDataSource1.TransformArgumentList = xslTransform;
GridView1.DataSource = XmlDataSource1;
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
BindData();
}
}
}
这是我的xml文件:
<?xml version="1.0" encoding="utf-8" ?>
<PARCELS REC-COUNT="29" START-COUNT="1" MAXED-TIME="FALSE">
<PARCEL>
<ALT-KEY>00792191</ALT-KEY>
<PARCEL-ID>R01 221 17 3360 0630</PARCEL-ID>
<PARCEL-DISPLAY>R01 221 17 3360 0630 0150</PARCEL-DISPLAY>
<OWNER-NAME>POWERS PHYLLIS</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>ROYAL HIGHLANDS UNIT 8</PARCEL-DESCRIPTION>
<SITUS>11145 THRASHER AVE</SITUS>
<MAIL-ADDRESS-1>11145 THRASHER AVE</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>WEEKI WACHEE FL 34614-0512</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>WEEKI WACHEE, FL 34614-0512</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000006380</APPR-VALUE>
<TAX-VALUE>0000006380</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>3360</AREA>
<LAST-SALE>01/22/10</LAST-SALE>
<LAST-PRICE>11000</LAST-PRICE>
<LAST-QUAL>D</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00233526</ALT-KEY>
<PARCEL-ID>R32 323 17 5030 0141</PARCEL-ID>
<PARCEL-DISPLAY>R32 323 17 5030 0141 0070</PARCEL-DISPLAY>
<OWNER-NAME>LEPP MIRIAM M</OWNER-NAME>
<OWNER-NAME2>C/O MARIA B KARDOS, POWERS JOSEPH L</OWNER-NAME2>
<PARCEL-DESCRIPTION>SPRING HILL UNIT 3</PARCEL-DESCRIPTION>
<SITUS>1498 PIE CT</SITUS>
<MAIL-ADDRESS-1>18906 DVORAK DR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>BROOKSVILLE FL 34610-2134</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>BROOKSVILLE, FL 34610-2134</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000067997</APPR-VALUE>
<TAX-VALUE>0000067997</TAX-VALUE>
<BASE-AREA>0002000</BASE-AREA>
<YEAR-BUILT>1983</YEAR-BUILT>
<AREA>5010</AREA>
<LAST-SALE>11/03/05</LAST-SALE>
<LAST-PRICE>237000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00322181</ALT-KEY>
<PARCEL-ID>R32 323 17 5250 1679</PARCEL-ID>
<PARCEL-DISPLAY>R32 323 17 5250 1679 0090</PARCEL-DISPLAY>
<OWNER-NAME>JOHNSON KEVIN K, POWERS JAIME L</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>SPRING HILL UNIT 25</PARCEL-DESCRIPTION>
<SITUS>4420 KEYES AVE</SITUS>
<MAIL-ADDRESS-1>11132 LABRADOR DUCK RD</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>WEEKI WACHEE FL 34614-4125</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>WEEKI WACHEE, FL 34614-4125</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000038455</APPR-VALUE>
<TAX-VALUE>0000038455</TAX-VALUE>
<BASE-AREA>0001344</BASE-AREA>
<YEAR-BUILT>1973</YEAR-BUILT>
<AREA>5250</AREA>
<LAST-SALE>01/10/12</LAST-SALE>
<LAST-PRICE>20000</LAST-PRICE>
<LAST-QUAL>D</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00673738</ALT-KEY>
<PARCEL-ID>R32 323 17 5180 1251</PARCEL-ID>
<PARCEL-DISPLAY>R32 323 17 5180 1251 0210</PARCEL-DISPLAY>
<OWNER-NAME>POWERS JOHN E, POWERS SANDRA L</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>SPRING HILL UNIT 18</PARCEL-DESCRIPTION>
<SITUS>4487 ABAGAIL DR</SITUS>
<MAIL-ADDRESS-1>4487 ABAGAIL DR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>SPRING HILL FL 34608-2702</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>SPRING HILL, FL 34608-2702</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000086402</APPR-VALUE>
<TAX-VALUE>0000036402</TAX-VALUE>
<BASE-AREA>0001824</BASE-AREA>
<YEAR-BUILT>1988</YEAR-BUILT>
<AREA>5180</AREA>
<LAST-SALE>07/29/05</LAST-SALE>
<LAST-PRICE>232500</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01535253</ALT-KEY>
<PARCEL-ID>R09 223 18 3602 0390</PARCEL-ID>
<PARCEL-DISPLAY>R09 223 18 3602 0390 0220</PARCEL-DISPLAY>
<OWNER-NAME>POWERS CHERYL L</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>STERLING HILL PHASE 1B</PARCEL-DESCRIPTION>
<SITUS>4583 LARKENHEATH DR</SITUS>
<MAIL-ADDRESS-1>4583 LARKENHEATH DR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>SPRING HILL FL 34609</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>SPRING HILL, FL 34609</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000136482</APPR-VALUE>
<TAX-VALUE>0000136482</TAX-VALUE>
<BASE-AREA>0003197</BASE-AREA>
<YEAR-BUILT>2006</YEAR-BUILT>
<AREA>3601</AREA>
<LAST-SALE>08/15/13</LAST-SALE>
<LAST-PRICE>160000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01342773</ALT-KEY>
<PARCEL-ID>R31 223 18 3504 0000</PARCEL-ID>
<PARCEL-DISPLAY>R31 223 18 3504 0000 1060</PARCEL-DISPLAY>
<OWNER-NAME>POWERS GERALD M</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>WELLINGTON AT SEVEN HILLS PH 2</PARCEL-DESCRIPTION>
<SITUS>525 BENT OAK CT</SITUS>
<MAIL-ADDRESS-1>525 BENT OAK CT</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>SPRING HILL FL 34609-9662</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>SPRING HILL, FL 34609-9662</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000107504</APPR-VALUE>
<TAX-VALUE>0000052004</TAX-VALUE>
<BASE-AREA>0001800</BASE-AREA>
<YEAR-BUILT>1999</YEAR-BUILT>
<AREA>WELLTN</AREA>
<LAST-SALE>09/07/99</LAST-SALE>
<LAST-PRICE>156500</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00054835</ALT-KEY>
<PARCEL-ID>R11 123 21 0620 0000</PARCEL-ID>
<PARCEL-DISPLAY>R11 123 21 0620 0000 2980</PARCEL-DISPLAY>
<OWNER-NAME>POWERS ROBERT H</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>LAKEWOOD UNIT 3</PARCEL-DESCRIPTION>
<SITUS>5327 AZALEA CIR</SITUS>
<MAIL-ADDRESS-1>5327 AZALEA CIR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>DADE CITY FL 33523</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>DADE CITY, FL 33523</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000066401</APPR-VALUE>
<TAX-VALUE>0000066401</TAX-VALUE>
<BASE-AREA>0001844</BASE-AREA>
<YEAR-BUILT>1979</YEAR-BUILT>
<AREA>0580</AREA>
<LAST-SALE>06/28/12</LAST-SALE>
<LAST-PRICE>63000</LAST-PRICE>
<LAST-QUAL>D</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00722445</ALT-KEY>
<PARCEL-ID>R32 323 17 5220 1522</PARCEL-ID>
<PARCEL-DISPLAY>R32 323 17 5220 1522 0040</PARCEL-DISPLAY>
<OWNER-NAME>POWERS CARL T</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>SPRING HILL UNIT 22</PARCEL-DESCRIPTION>
<SITUS>6291 SUNDAY RD</SITUS>
<MAIL-ADDRESS-1>6291 SUNDAY RD</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>SPRING HILL FL 34608-1271</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>SPRING HILL, FL 34608-1271</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000069871</APPR-VALUE>
<TAX-VALUE>0000024500</TAX-VALUE>
<BASE-AREA>0001654</BASE-AREA>
<YEAR-BUILT>1989</YEAR-BUILT>
<AREA>5220</AREA>
<LAST-SALE>12/01/81</LAST-SALE>
<LAST-PRICE>4000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01589463</ALT-KEY>
<PARCEL-ID>R35 223 18 3707 0160</PARCEL-ID>
<PARCEL-DISPLAY>R35 223 18 3707 0160 0100</PARCEL-DISPLAY>
<OWNER-NAME>POWERS VIRGINIA P</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>TRILLIUM VILLAGE A</PARCEL-DESCRIPTION>
<SITUS>635 SEA HOLLY DR</SITUS>
<MAIL-ADDRESS-1>635 SEA HOLLY DR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>BROOKSVILLE FL 34604</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>BROOKSVILLE, FL 34604</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000089846</APPR-VALUE>
<TAX-VALUE>0000039846</TAX-VALUE>
<BASE-AREA>0002207</BASE-AREA>
<YEAR-BUILT>2007</YEAR-BUILT>
<AREA>3707</AREA>
<LAST-SALE>04/16/07</LAST-SALE>
<LAST-PRICE>181900</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01009991</ALT-KEY>
<PARCEL-ID>R21 223 17 6221 0000</PARCEL-ID>
<PARCEL-DISPLAY>R21 223 17 6221 0000 0370</PARCEL-DISPLAY>
<OWNER-NAME>POWERS NANCY H, SMITH DARRELL</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>TIMBER PINES TR 22 UNIT 1</PARCEL-DESCRIPTION>
<SITUS>6393 PLANTATION RD</SITUS>
<MAIL-ADDRESS-1>9388 FRENCH QUARTERS CIR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>BROOKSVILLE FL 34613-4212</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>BROOKSVILLE, FL 34613-4212</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000062802</APPR-VALUE>
<TAX-VALUE>0000062802</TAX-VALUE>
<BASE-AREA>0001072</BASE-AREA>
<YEAR-BUILT>1988</YEAR-BUILT>
<AREA>TP01</AREA>
<LAST-SALE>05/25/05</LAST-SALE>
<LAST-PRICE>160000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00846124</ALT-KEY>
<PARCEL-ID>R10 223 17 1423 0008</PARCEL-ID>
<PARCEL-DISPLAY>R10 223 17 1423 0008 0050</PARCEL-DISPLAY>
<OWNER-NAME>POWERS PHYLIS</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>BERKELEY MANOR</PARCEL-DESCRIPTION>
<SITUS>8087 RHANBUOY RD</SITUS>
<MAIL-ADDRESS-1>11145 THRASHER AVE</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>WEEKI WACHEE FL 34614-0512</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>WEEKI WACHEE, FL 34614-0512</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000111187</APPR-VALUE>
<TAX-VALUE>0000061187</TAX-VALUE>
<BASE-AREA>0002766</BASE-AREA>
<YEAR-BUILT>1990</YEAR-BUILT>
<AREA>1423</AREA>
<LAST-SALE>11/01/89</LAST-SALE>
<LAST-PRICE>18000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01113057</ALT-KEY>
<PARCEL-ID>R26 222 17 3740 0000</PARCEL-ID>
<PARCEL-DISPLAY>R26 222 17 3740 0000 0930</PARCEL-DISPLAY>
<OWNER-NAME>POWERS HAROLD E, POWERS EVELYN M</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>VOSS OAK LAKE ESTATES</PARCEL-DESCRIPTION>
<SITUS>8969 OSTROM WAY</SITUS>
<MAIL-ADDRESS-1>8969 OSTROM WAY</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>WEEKI WACHEE FL 34613-4481</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>WEEKI WACHEE, FL 34613-4481</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000114243</APPR-VALUE>
<TAX-VALUE>0000064243</TAX-VALUE>
<BASE-AREA>0001951</BASE-AREA>
<YEAR-BUILT>2004</YEAR-BUILT>
<AREA>3740</AREA>
<LAST-SALE>08/31/07</LAST-SALE>
<LAST-PRICE>205000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00600184</ALT-KEY>
<PARCEL-ID>R27 222 18 1474 0570</PARCEL-ID>
<PARCEL-DISPLAY>R27 222 18 1474 0570 0180</PARCEL-DISPLAY>
<OWNER-NAME>POWERS WILLIAM J, POWERS MARSHA J</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>BROOKRIDGE COMMUNITY UNIT 4</PARCEL-DESCRIPTION>
<SITUS>9199 DENMARSH DR</SITUS>
<MAIL-ADDRESS-1>9199 DENMARSH DR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>BROOKSVILLE FL 34613</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>BROOKSVILLE, FL 34613</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000043055</APPR-VALUE>
<TAX-VALUE>0000000000</TAX-VALUE>
<BASE-AREA>0001404</BASE-AREA>
<YEAR-BUILT>1988</YEAR-BUILT>
<AREA>1472</AREA>
<LAST-SALE>03/21/01</LAST-SALE>
<LAST-PRICE>66000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01195959</ALT-KEY>
<PARCEL-ID>R13 222 17 1833 0000</PARCEL-ID>
<PARCEL-DISPLAY>R13 222 17 1833 0000 0980</PARCEL-DISPLAY>
<OWNER-NAME>POWERS ROBERT D, HERDELL-POWERS NANCY</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>GLEN HILLS VILLAGE</PARCEL-DESCRIPTION>
<SITUS>9388 FRENCH QUARTERS CIR</SITUS>
<MAIL-ADDRESS-1>9388 FRENCH QUARTERS CIR</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>BROOKSVILLE FL 34613-4212</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>BROOKSVILLE, FL 34613-4212</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000087904</APPR-VALUE>
<TAX-VALUE>0000032904</TAX-VALUE>
<BASE-AREA>0001496</BASE-AREA>
<YEAR-BUILT>1991</YEAR-BUILT>
<AREA>GL03</AREA>
<LAST-SALE>05/24/06</LAST-SALE>
<LAST-PRICE>220900</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>I</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01708487</ALT-KEY>
<PARCEL-ID>R10 223 18 3184 0000</PARCEL-ID>
<PARCEL-DISPLAY>R10 223 18 3184 0000 000B</PARCEL-DISPLAY>
<OWNER-NAME>POWERSTROKE PROPERTIES LLC</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>POWERSTROKE PLAT</PARCEL-DESCRIPTION>
<SITUS>ASTAIRE LN</SITUS>
<MAIL-ADDRESS-1>711 S CARSON ST STE 4</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>CARSON CITY NV 89701-5292</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>CARSON CITY, NV 89701-5292</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000000610</APPR-VALUE>
<TAX-VALUE>0000000610</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>CPOWL</AREA>
<LAST-SALE>01/01/08</LAST-SALE>
<LAST-PRICE>3400000</LAST-PRICE>
<LAST-QUAL>S</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01708511</ALT-KEY>
<PARCEL-ID>R10 223 18 3184 0000</PARCEL-ID>
<PARCEL-DISPLAY>R10 223 18 3184 0000 0020</PARCEL-DISPLAY>
<OWNER-NAME>POWERSTROKE PROPERTIES LLC</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>POWERSTROKE PLAT</PARCEL-DESCRIPTION>
<SITUS>ASTAIRE LN</SITUS>
<MAIL-ADDRESS-1>711 S CARSON ST STE 4</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>CARSON CITY NV 89701-5292</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>CARSON CITY, NV 89701-5292</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000011967</APPR-VALUE>
<TAX-VALUE>0000011967</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>PDPSFR</AREA>
<LAST-SALE>01/01/08</LAST-SALE>
<LAST-PRICE>3400000</LAST-PRICE>
<LAST-QUAL>S</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>01492673</ALT-KEY>
<PARCEL-ID>R10 223 18 3184 0000</PARCEL-ID>
<PARCEL-DISPLAY>R10 223 18 3184 0000 000A</PARCEL-DISPLAY>
<OWNER-NAME>POWERSTROKE PROPERTIES LLC</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>POWERSTROKE PLAT</PARCEL-DESCRIPTION>
<SITUS>ASTAIRE LN</SITUS>
<MAIL-ADDRESS-1>711 S CARSON ST STE 4</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>CARSON CITY NV 89701-5292</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>CARSON CITY, NV 89701-5292</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000002000</APPR-VALUE>
<TAX-VALUE>0000002000</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>CPOWL</AREA>
<LAST-SALE>09/29/06</LAST-SALE>
<LAST-PRICE>3400000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00202453</ALT-KEY>
<PARCEL-ID>R17 223 19 1780 0260</PARCEL-ID>
<PARCEL-DISPLAY>R17 223 19 1780 0260 0030</PARCEL-DISPLAY>
<OWNER-NAME>POWERS DONN Q</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>GARDEN GROVE BLK 26</PARCEL-DESCRIPTION>
<SITUS>BROAD ST</SITUS>
<MAIL-ADDRESS-1>19 REDBAY CT E</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>HOMOSASSA FL 34446-5121</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>HOMOSASSA, FL 34446-5121</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000004950</APPR-VALUE>
<TAX-VALUE>0000004950</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>C411</AREA>
<LAST-SALE></LAST-SALE>
<LAST-PRICE>0000000000</LAST-PRICE>
<LAST-QUAL></LAST-QUAL>
<LAST-VORI></LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00168026</ALT-KEY>
<PARCEL-ID>R13 223 16 2350 1080</PARCEL-ID>
<PARCEL-DISPLAY>R13 223 16 2350 1080 0250</PARCEL-DISPLAY>
<OWNER-NAME>POWERS JANICE</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>HERNANDO BEACH UNIT 12</PARCEL-DESCRIPTION>
<SITUS>CRAPE MYRTLE DR</SITUS>
<MAIL-ADDRESS-1>1408 SE 5TH AVE</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>CRYSTAL RIVER FL 34429-4928</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>CRYSTAL RIVER, FL 34429-4928</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000029227</APPR-VALUE>
<TAX-VALUE>0000029227</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>2350</AREA>
<LAST-SALE>06/06/03</LAST-SALE>
<LAST-PRICE>55000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00723872</ALT-KEY>
<PARCEL-ID>R01 221 17 3340 0348</PARCEL-ID>
<PARCEL-DISPLAY>R01 221 17 3340 0348 0120</PARCEL-DISPLAY>
<OWNER-NAME>POWERS JAMES J, POWERS PHYLLIS M</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>ROYAL HIGHLANDS UNIT 5</PARCEL-DESCRIPTION>
<SITUS>FLICKER RD</SITUS>
<MAIL-ADDRESS-1>8087 RHANBUOY RD</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>SPRING HILL FL 34606-1954</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>SPRING HILL, FL 34606-1954</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000004000</APPR-VALUE>
<TAX-VALUE>0000004000</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>3340</AREA>
<LAST-SALE>07/01/05</LAST-SALE>
<LAST-PRICE>42000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00062648</ALT-KEY>
<PARCEL-ID>R01 221 17 3290 0092</PARCEL-ID>
<PARCEL-DISPLAY>R01 221 17 3290 0092 0010</PARCEL-DISPLAY>
<OWNER-NAME>POWERS HAROLD E, POWERS EVELYN</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>ROYAL HIGHLANDS</PARCEL-DESCRIPTION>
<SITUS>FLORIDA WREN AVE</SITUS>
<MAIL-ADDRESS-1>8969 OSTROM WAY</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>WEEKI WACHEE FL 34613</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>WEEKI WACHEE, FL 34613</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000004350</APPR-VALUE>
<TAX-VALUE>0000004350</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>3290</AREA>
<LAST-SALE>03/26/04</LAST-SALE>
<LAST-PRICE>9000</LAST-PRICE>
<LAST-QUAL>Q</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
<PARCEL>
<ALT-KEY>00609540</ALT-KEY>
<PARCEL-ID>R01 221 17 3280 0012</PARCEL-ID>
<PARCEL-DISPLAY>R01 221 17 3280 0012 0120</PARCEL-DISPLAY>
<OWNER-NAME>POWERS BRENDA</OWNER-NAME>
<OWNER-NAME2></OWNER-NAME2>
<PARCEL-DESCRIPTION>ROYAL HIGHLANDS UNIT 1</PARCEL-DESCRIPTION>
<SITUS>YELLOWTHROAT AVE</SITUS>
<MAIL-ADDRESS-1>269 SPRING COLONY CIR SPT 142</MAIL-ADDRESS-1>
<MAIL-ADDRESS-2>ALTAMONTE SPRINGS FL 32714-5165</MAIL-ADDRESS-2>
<MAIL-ADDRESS-3>ALTAMONTE SPRINGS, FL 32714-5165</MAIL-ADDRESS-3>
<MAIL-ADDRESS-4></MAIL-ADDRESS-4>
<APPR-VALUE>0000004026</APPR-VALUE>
<TAX-VALUE>0000004026</TAX-VALUE>
<BASE-AREA>0000000</BASE-AREA>
<YEAR-BUILT>0000</YEAR-BUILT>
<AREA>3280</AREA>
<LAST-SALE>07/01/86</LAST-SALE>
<LAST-PRICE>10200</LAST-PRICE>
<LAST-QUAL>D</LAST-QUAL>
<LAST-VORI>V</LAST-VORI>
</PARCEL>
</PARCELS>
这是我的xsl文件:
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
>
<xsl:strip-space elements="*"/>
<xsl:output method="xml"
omit-xml-declaration="yes"
indent="yes"
standalone="yes" />
<xsl:param name="sortby" select="'OWNER-NAME'"/>
<xsl:param name="order" select="'ascending'"/>
<xsl:template match="/">
<xsl:for-each select="PARCELS">
<xsl:element name="PARCELS">
<xsl:for-each select="PARCEL">
<xsl:sort select="*[name()=$sortby]"/>
<xsl:element name="PARCEL">
<xsl:attribute name="ALT-KEY">
<xsl:value-of select="ALT-KEY"/>
</xsl:attribute>
<xsl:attribute name="PARCEL-DISPLAY">
<xsl:value-of select="PARCEL-DISPLAY"/>
</xsl:attribute>
<xsl:attribute name="OWNER-NAME">
<xsl:value-of select="OWNER-NAME"/>
</xsl:attribute>
<xsl:attribute name="SITUS">
<xsl:value-of select="SITUS"/>
</xsl:attribute>
<xsl:attribute name="PARCEL-DESCRIPTION">
<xsl:value-of select="PARCEL-DESCRIPTION"/>
</xsl:attribute>
<xsl:attribute name="LAST-SALE">
<xsl:value-of select="LAST-SALE"/>
</xsl:attribute>
<xsl:attribute name="LAST-PRICE">
<xsl:value-of select='format-number(LAST-PRICE,"$###,###,###,###")'/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
您需要将XPath="/Pacels/Parcel"添加到GridView中,请参阅以下内容:
<asp:GridView XPath="/Parcels/Parcel" ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" OnSorting="GridView1_Sorting" OnPageIndexChanging="GridView1_PageIndexChanging" >