private void binddress()
...{
string orderby=" CreationTime desc ";
string categoryId;
categoryId=ConfigurationSettings.APPSettings["SQ.CategoryId_fuzhuang"];
string queryString=" and CategoryId="+categoryId;
DataSet dsdress=ServiceInterfaces.SQService.Query(queryString,orderby,15,1,ref RecordCount);
DataTable dt1=dsdress.Tables[0].Copy();
DataTable dt2=dsdress.Tables[0].Copy();
for(int i=dt1.Rows.Count-1;i>=0;i--)
...{
if(i>=10)
...{
dt1.Rows[i].Delete();
}
}
for(int j=0;j<dt2.Rows.Count;j++)
...{
if(j<10)
...{
dt2.Rows[j].Delete();
}
}
this.reapter1.DataMember="SQs";
this.reapter1.DataSource=dt1;
this.reapter1.DataBind();
this.reapter2.DataSource=dt2;
thisreapter2.DataMember="SQs";
this.reapter2.DataBind();
}
Html
<p>
//綁定兩種樣式是用
<reapter1><itemtemplate>
Counter++;
if(Counter==1)
{
--><strong class="org<!--Biz.CommonMethod.CutString(DataBinder.Eval(Container.DataItem, "Subject"),25--></a></strong><br /><!-- }
else
{
<!--Biz.CommonMethod.CutString(DataBinder.Eval(Container.DataItem, "Subject"),25--></a><br /><!--
}
-->&n;</p>></itemtemplate></reapter>
<p><!--DataBinder.Eval(Container.DataItem, "Subject")--></p>
<p> </p>
<repter2><itemtemplater>
在cs頁面中