SiteAdmin/Aspx/TechWatchEdit.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

    public partial class SiteAdmin_Aspx_Edit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies["roleid"] != null)
            {
                if (!IsPostBack)
                {
                    binddr();
                }
            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
            }
        }
        public void binddr()
        {         
            try
            {
                News myn = new News();
                myn.GetModel(Convert.ToInt16(Request.QueryString["ID"].ToString()));
                HiddID.Text = myn.image;
                TextBox_Title.Text = myn.title;
                TextBox_Fromto.Text = myn.fromto;
                FCKeditor_Content.Value = myn.content;
                DropDownList_Fid.SelectedValue = myn.fid.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void LinkButton_Add_Click(object sender, EventArgs e)
        {
            string Title = TextBox_Title.Text.Trim();
            string Fromto = TextBox_Fromto.Text.Trim();
            string Fid = DropDownList_Fid.SelectedValue;
            string Content = FCKeditor_Content.Value;
            DateTime Posttime = DateTime.Now;

            if (FileUpload_image.HasFile)
            {
                string FileExt = System.IO.Path.GetExtension(FileUpload_image.FileName).ToUpper();
                if (FileExt != ".JPG" && FileExt != ".BMP" && FileExt != ".PNG" && FileExt != ".GIF")
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script type=\"text/javascript\">alert(\" 不支持的文件格式,请上图片文件\")</script>");
                }
                else
                {
                    string FileName = Guid.NewGuid().ToString("n");
后面还有 57 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。