利用插件分页:
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" ShowPageIndexBox="Always" TextBeforePageIndexBox="跳转至: " HorizontalAlign="left" Font-Size="12px" EnableTheming="true" OnPageChanged="AspNetPager1_PageChanged" PageSize="12" FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页" NextPrevButtonClass="tslj" PagingButtonClass="tslj" FirstLastButtonClass="tslj"> </webdiyer:AspNetPager>
后台代码 见文件夹中的word pager
包括标记 repater的序号
综合查找时:时间文本框 用插件选择时间
<script src="../../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<asp:TextBox ID="loseStart" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" runat="server" Width="75px" Height="19px"></asp:TextBox>至<asp:TextBox ID="loseEnd" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" Width="75"></asp:TextBox>
图片加载时,防止页面等在加载图片时间过久,先把图片存放在 前台隐藏控件
<asp:hiddenField>中,使用js代码,延迟显示:
$(function () {
setTimeout(function () { var detail = $("#hdDetailImg").val();
//$("#temp").html(detail);
//alert(detail);
if (detail.length > 3) {
detail = detail.substr(0, detail.length - 1);
detail = "[" + detail + "]";
var jsonobj = eval('(' + detail + ')');
//alert(jsonobj.length);
for (i = 0; i < jsonobj.length; i++) {
$("#" + jsonobj[i].id).attr("width", "220");
$("#" + jsonobj[i].id).attr("height", "200");
$("#" + jsonobj[i].id).attr("src", jsonobj[i].src);
}
}
}, 500);
});
后台代码:
public string GetImageUrl(string url, string id, string pre)
{
string str = "loading.gif";
if (url.Length > 10)
{
hdDetailImg.Value += "{\"id\":\"" + pre + id + "\",\"src\":\"" + url + "\"},";
}
else
{
hdDetailImg.Value += "{\"id\":\"" + pre + id + "\",\"src\":\"../../images/nopic.jpg\"},";
}
return str;
}