Web/Admin/Brand_Manage/Brand_Update.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using JY.Model;
using JY.BLL;
using Maticsoft.DBUtility;
using System.Text;
public partial class Brand_Update : PasePage
{
JY.BLL.Brand bll = new JY.BLL.Brand();
JY.Model.Brand model = new JY.Model.Brand();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
initBrand();
}
}
/// <summary>
/// 保存图片
/// </summary>
public void btnUpPic_Click(object sender, EventArgs e)
{
if (file1.PostedFile != null)
{
if (file1.PostedFile.ContentLength > 2097152)
{
publicHandle.ShowMessage(this.Page, "提示:图片不能大于2M!");
return;
}
else
{
hid.Value = upPhoto(file1);
Response.Write("<script>alert('上传成功!');</script>");
}
}
}
/// <summary>
/// 返回文件名称
/// </summary>
protected string upPhoto(FileUpload file)
{
if (file.PostedFile != null)
{
if (file.PostedFile.ContentLength > 2097152)
{
publicHandle.ShowMessage(this.Page, "提示:图片不能大于2M!");
return "";
}
else
{
string filename;//文件名字
后面还有 87 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
