Admin/Conctrl/AddBlog.ascx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 JD.Model;
using JD.BLL;
public partial class Admin_Conctrl_AddBlog : System.Web.UI.UserControl
{
int id;
Blog _b;
int type;
protected void Page_Load(object sender, EventArgs e)
{
type = Convert.ToInt32(Request.QueryString["type"]);
id = Convert.ToInt32(Request.QueryString["id"]);
if (id != 0)
{
_b = BlogMananger.GetByID(id);
type = _b.Type.ParID;
if (!IsPostBack)
{
DropDownList1.DataSource = BlogTypeMananger.Get(_b.Type.ParID);
DropDownList1.DataBind();
TextBox1.Text = _b.Title;
FreeTextBox1.Text = _b.Text;
DropDownList1.ClearSelection();
DropDownList1.Items.FindByValue(_b.Type.Id.ToString()).Selected=true;
CheckBox1.Checked = _b.Order == 0 ? true : false;
}
}
else if (!IsPostBack)
{
DropDownList1.DataSource = BlogTypeMananger.Get(type);
DropDownList1.DataBind();
}
if (type != 2)
imgtr.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
string mgf = string.Empty;
string filename = FileUpload1.FileName;
if (filename != "")
{
if (!(filename.ToLower().EndsWith(".jpg") || filename.ToLower().EndsWith(".gif")))
{
Page.ClientScript.RegisterClientScriptBlock(GetType(), "key", "alert('图片格式有误,必须为jpg或gif格式')",true);
return;
}
}
Blog b = new Blog ();
b.Img = "0";
后面还有 27 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。