📄 news_more.aspx.cs
字号:
using System;
using System.Data;
using System.Data.OleDb;
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;
public partial class News_more : System.Web.UI.Page
{
public string Titlep;
public string Descriptionp;
public string Keywordsp;
protected void Page_Load(object sender, EventArgs e)
{
string ID =FunStr(Request.QueryString["ID"].ToString());
GetContent contact = new GetContent();
OleDbDataReader dr = contact.GetNewsList(ID);
while (dr.Read())
{
this.Ltitle.Text = dr["title"].ToString() ;
this.Lcontent.Text = dr["content"].ToString();
}
dr.Close();
//title,des,con
GetContent drt = new GetContent();
OleDbDataReader drf = drt.GetTDC();
while (drf.Read())
{
this.Titlep = drf["Title"].ToString();
this.Descriptionp = drf["Description"].ToString();
this.Keywordsp = drf["Keywords"].ToString();
}
drf.Close();
}
public static string FunStr(string str)
{
str = str.Replace("&", "");
str = str.Replace("<", "");
str = str.Replace(">", "");
str = str.Replace("'", "");
str = str.Replace("*", "");
str = str.Replace("\n", "");
str = str.Replace("\r\n", "");
str = str.Replace("?", "");
str = str.Replace("select", "");
str = str.Replace("insert", "");
str = str.Replace("update", "");
str = str.Replace("delete", "");
str = str.Replace("create", "");
str = str.Replace("drop", "");
str = str.Replace("delcare", "");
str = str.Replace(" ", "");
str = str.Trim();
if (str.Trim().ToString() == "")
str = "无";
return str;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -