showNews.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:1k
源码类别:
Email客户端
开发平台:
Visual C++
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Data.SqlClient; //添加类库
- public partial class showNews : System.Web.UI.Page
- {
- BaseClass bc = new BaseClass();
- protected void Page_Load(object sender, EventArgs e)
- {
- DataSet ds = bc.GetDataSet("select * from tbNews", "news");
- //DataRow[] row = ds.Tables[0].Select("id="+Request.QueryString["id"]);
- DataRow[] row = ds.Tables["tbNews"].Select("id="+Request.QueryString["id"]);
- foreach (DataRow rs in row)
- {
- this.Page.Title = rs["title"].ToString();
- Label1.Text = rs["title"].ToString();
- TextBox1.Text =" "+ rs["content"].ToString();
- }
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- Response.Write("<script language=javascript>window.close()</script>");
- }
- }