📄 selectnewsspecial_ajax.aspx.cs
字号:
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 NetCMS.Content;
using NetCMS.Content.Common;
public partial class configuration_system_SelectNewsspecial_ajax : NetCMS.Web.UI.DialogPage
{
public configuration_system_SelectNewsspecial_ajax()
{
BrowserAuthor = EnumDialogAuthority.ForAdmin;
}
rootPublic pd = new rootPublic();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Response.CacheControl = "no-cache";
Response.Expires = 0;
spList.InnerHtml = spstr();
}
}
string spstr()
{
string ParentId = Request.QueryString["ParentId"];
if (ParentId == "" || ParentId == null)
{
ParentId = "0";
}
else
{
ParentId = ParentId.ToString();
}
string liststr = string.Empty;
IDataReader rd = pd.GetajaxsspecialList(ParentId);
while (rd.Read())
{
if (Convert.ToInt32(rd["HasSub"]) > 0)
{
liststr += "<div><img src=\"../../sysImages/normal/b.gif\" alt=\"点击展开子栏目\" border=\"0\" class=\"LableItem\" onClick=\"javascript:SwitchImg(this,'" + rd["SpecialID"] + "');\" /> <span id=\"" + rd["SpecialID"] + "\" class=\"LableItem\" ondblclick=\"ReturnValue();\" onClick=\"SelectLable(this);sFiles('" + rd["SpecialID"] + "','" + rd["SpecialCName"] + "');\">" + rd["SpecialCName"] + "</span><div id=\"Parent" + rd["SpecialID"] + "\" class=\"SubItem\" HasSub=\"True\" style=\"height:100%;display:none;\"></div></div>";
}
else
{
liststr += "<div><img src=\"../../sysImages/normal/s.gif\" alt=\"没有子栏目\" border=\"0\" class=\"LableItem\" /> <span id=\"" + rd["SpecialID"] + "\" class=\"LableItem\" ondblclick=\"ReturnValue();\" onClick=\"SelectLable(this);sFiles('" + rd["SpecialID"] + "','" + rd["SpecialCName"] + "');\">" + rd["SpecialCName"] + "</span>";
}
}
if (liststr != string.Empty)
liststr = "Succee|||" + ParentId + "|||" + liststr;
else
liststr = "Fail|||" + ParentId + "|||";
return liststr;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -