>  기사  >  웹 프론트엔드  >  AJAX 배경을 스크롤하는 Jquery 알림이 data_jquery를 가져옵니다.

AJAX 배경을 스크롤하는 Jquery 알림이 data_jquery를 가져옵니다.

WBOY
WBOY원래의
2016-05-16 18:07:471070검색

aspx

코드 복사 코드는 다음과 같습니다.







<%--头部部分--%>
border="0">






















<%--头partpart结束--%>
后台Util/MainUtil.aspx.cs输流对应的 HTML 的数据
시스템 사용;
System.Collections 사용;
System.Configuration 사용;
System.Data 사용;
System.Linq 사용;
System.Web 사용;
System.Web.Security 사용;
System.Web.UI 사용;
System.Web.UI.HtmlControls 사용;
System.Web.UI.WebControls 사용;
System.Web.UI.WebControls.WebParts 사용;
System.Xml.Linq 사용;
네임스페이스 Web.Util
{
public 부분 클래스 MainUtil : System.Web.UI.Page
{
protected void Page_Load(객체 전송자, EventArgs e)
{
시도
{
int k = int.Parse(Request["param"].ToString());
스위치(k)
{
사례 1:
toOne();
휴식;
사례 2:
toTwo();
휴식;
기본값:
break;
}
}
catch { }
}
private void toOne()
{
try
{
string st = String.Empty;
string companyName = 요청["nameparam"].ToString();
DataTable dt1 = DBUtility.DbHelperSQL.Query("select top(5) Title,Id from 公告表 where TypeId='2' And Creater='" companyName "'order by CreatTime desc").Tables[0];
for (int i = 0; i < dt1.Rows.Count; i )
{
//把公告做成超链接
st = "
  • " dt1.Rows[i]["Title"].ToString() "
  • ";
    }
    showHtml(st);
    }
    catch { }
    }
    private void toTwo()
    {
    try
    {
    string st = String.Empty;
    string companyName= 요청["nameparam"].ToString();
    DataTable dt2= DBUtility.DbHelperSQL.Query("select top(5) Title,Id from 公告表 where Id IN (select top 10 Id from 公告表 where TypeId='2' And Creater='" companyName "'order CreatTime 기준 desc) 주문 기준 CreatTime asc").Tables[0];
    //把공공告做成超链接
    for (int i = 0; i < dt2.Rows.Count; i )
    {
    st = "
  • " dt2.Rows[i]["Title"].ToString() "
  • ";
    }
    showHtml(st);
    }
    catch { }
    }
    private void showHtml(string st){
    Response.ContentType = "text/html";//text/html,화application/json tour是输出格式
    Response.Write(st);
    Response.Flush();
    응답.닫기();
    }
    }
    }

    성명:
    본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.


    公告: