易截截图软件、单文件、免安装、纯绿色、仅160KB

asp gridView 无数据时候,显示表头

 public void Gridview_BindNoRecords(GridView gridView, DataTable dt) // gridView,绑定数据源DT
    {
        int a = dt.Rows.Count;
        if (dt.Rows.Count == 0)
        {
            dt.Rows.Add(dt.NewRow());
            gridView.DataSource = dt;
            gridView.DataBind();
            int columnCount = gridView.Rows[0].Cells.Count;
            gridView.Rows[0].Cells.Clear();
            gridView.Rows[0].Cells.Add(new TableCell());
            gridView.Rows[0].Cells[0].ColumnSpan = columnCount;
            gridView.Rows[0].Cells[0].Text = "要显示的内容";
            gridView.RowStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
        }
    }
调用:
在 gridView.BindData();方法后 调用!


相关文档:

asp下闰年计算方法

计算闰年主要是为了判断2月份的天数,一般闰年2月份是29天,平年2月份是28天。计算闰年的算法非常简单,即:能被400整除,或者能被4整除而不能被100整除。
算法如下:
 function isLeapYear(pYear)
    set oreg=new RegExp
    oreg.Pattern="^\d{4}$"
    if n ......

asp长文章分页收集存档

<%
if Request.QueryString("pageNo")="" then
PageNo=1
elseif IsNumeric(Request.QueryString("pageNo"))=false then
PageNo=1
else
PageNo=clng(Request.QueryString("pageNo"))
end if
打开数据表..不写了哈.
set rs=server.CreateObject("adodb.recordset")
sql="............"
rs.open sql, ......

ASP中调用带参数输出的COM接口

 COM接口VC实现,接口:
[id(1), helpstring("method Test")] HRESULT Test([in] BSTR strInputA, [in] BSTR strInputB, [out,retval] VARIANT* result);
ASP调用:
Set   objCompInfo   =server.CreateObject("组件在系统中的名字")  
      ......

使用ASP发送飞信的免费短信

要实现在asp网站上发送飞信,要求是中国移动的手机用户,并且开通移动飞信功能。
     使用以下asp代码,修改参数为你的手机号及飞信密码,就可以实现在网站发免费短信功能。
    
fsend.asp文件源代码如下:
<%
    Dim fno,fp,tofno,rurl
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号