蜜桃欧美|戒汤唯未删减版|先锋影音av资源在线观看|国产精品裸体一区二区三区,这么多年电影完整版免费在线观看,卧底2020电视剧免费全集在线观看,美好事物电影完整版在线观看

主營業(yè)務(wù):網(wǎng)站制作 網(wǎng)站優(yōu)化 小程序制作 石家莊網(wǎng)站制作網(wǎng)站建設(shè)有限公司歡迎您!
石家莊閃云網(wǎng)絡(luò)科技有限公司
客服熱線15383239821
如何讓自己的網(wǎng)站更有質(zhì)量?

aspx頁面引用命名空間

發(fā)布時間:2011/2/19 6:19:27

我是想在aspx頁面中將dataset中的某個值(新聞),直接寫到html上,但如果在cs中取得了dataset,在aspx中好像不能直接調(diào)用,說是沒定義,所以我想直接在aspx中直接寫代碼,把dataset值取出來用。

    這時就要將一些命名空間引用,在aspx頁面中引用命名空間,不像cs中用using,而是用,<%@   Import   Namespace="" %>

    還有,如果是在aspx頁面中獲取 前一頁傳的參數(shù):

    int id =Int32.Parse( this.Request.QueryString["id"]);

例:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="xx_ll_one.aspx.cs" Inherits="web_oa_xx_xx_ll_one" %>
<%@  Import   Namespace="System.Data"   %>
<%@  Import   Namespace="System.Data.SqlClient"   %>
<%@  Import   Namespace="jwglnet.DBUtility"   %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>無標題頁</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
  <tr>
   <%   string whfs = "查詢單條信息";
        int id=int.Parse(ViewState["id"].ToString());
      

        SqlParameter[] parameters = new SqlParameter[4];
        parameters[0] = new SqlParameter("@_whfs", whfs);
        parameters[1] = new SqlParameter("@_xq", "");
        parameters[2] = new SqlParameter("@_yhdm", "");
        parameters[3] = new SqlParameter("@_id",id );

        DataSet dsxx = DbHelperSQL.RunProcedure("pr_oa_xxgl_xxcx", parameters, "xxmp");
   %>
    <td bgcolor="#FFFFFF">
<p align="center"></p>
        <br/>
                             
 
<span class="style39">最后更新:<%=dsxx.Tables["xxmp"].Rows[0]["rq"]%> </span>

 
      <hr width="95%" size="1" color="#5AAE18" height="1"/>    
        <strong>
        </strong> <p>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <%=dsxx.Tables["xxmp"].Rows[0]["nr"]%>                                       &nbsp;&nbsp;  
          </p>
        <p>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 申請人:<%=dsxx.Tables["xxmp"].Rows[0]["username"]%> <br/>
           
                                          <%=dsxx.Tables["xxmp"].Rows[0]["rq"]%>  
        </p>
   
      <table width="334" border="0" cellspacing="0" cellpadding="0">
      
 
</table>
</table>
    </div>
    </form>
</body>
</html>


 

上一篇: access關(guān)鍵字

相關(guān)新聞推薦

在線客服 : 服務(wù)熱線:15383239821 電子郵箱: 27535611@qq.com

公司地址:石家莊市新華區(qū)九中街江西大廈4062

備案號:冀ICP備2022000585號-4