⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinterfacecontrol.ascx.cs

📁 该系统是留言版系统
💻 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 System.Windows.Forms;         //需要通过“添加引用”找到并添加,然后才能using

public partial class UserFaceControl_UserInterfaceControl : System.Web.UI.UserControl
{
    //LeaveMessagePara LMP = new LeaveMessagePara();

    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    Response.Write("<script></script>");
    //    LMBind();
    //    //TBcontents.Attributes.Add("onkeydown", "if(event.keyCode == 13){document.all[Submit].click();event.returnValue=false;}");
    //    //TBcontents.Attributes.Add("onkeydown", "CtrlEnter('Submit');");
    //}

    //protected void Submit_Click(object sender, EventArgs e)
    //{
    //    if (TBuser.Text == "" || TBQQMSN.Text == "" || TBcontents.Text == "")
    //        Response.Write("<Script Language=JavaScript>alert(\"提示:用户名、QQ/MSN、留言信息3项必填。\")</Script>");
    //    else
    //    {   
    //        LMP.ID = AutoCreateID.NewID();
    //        LMP.User = FormatString.FormatStr(TBuser.Text);
    //        LMP.QQMSN = FormatString.FormatStr(TBQQMSN.Text);
    //        LMP.Title = FormatString.FormatStr(TBtitle.Text);
    //        LMP.Contents = FormatString.FormatStr(TBcontents.Text);
    //        LMP.SubmitTime = DateTime.Now;

    //        if (LMManage.AddNewLeaveMessage(LMP))
    //        {
    //            TBtitle.Text = "";
    //            TBcontents.Text = "";
    //            LMBind();
    //        }
    //        else Response.Write("Ex: " + DBControl.DBExceptionEvent());
    //    }
    //}

    //protected void LMBind()
    //{
    //    LeaveMessageList.DataSource = LMManage.GetLeaveMessage(15);
    //    LeaveMessageList.DataBind();
    //}

    //protected void LeaveMessageList_ItemCommand(object sender, DataListCommandEventArgs e)
    //{
    //    if (TBuser.Text == "")
    //        Response.Write("<Script Language=JavaScript>alert(\"提示:回复他人留言,你必须在下面的留言框输入您的用户名。\")</Script>");
    //    else
    //    {
    //        //用变量保存“回复”按键所映射的相应留言的ID(参看LinkButton的CommandName属性)
    //        string ButtoMappedID = ((LinkButton)e.CommandSource).CommandName;
    //        //Response.Write(ButtoMappedID);
    //        Session["OwnerID"] = ButtoMappedID;
    //        Session["YourName"] = TBuser.Text;
    //        Response.Redirect("Default2.aspx"); //(1)
    //        /*//(2)用JavaScript实现自动链接页面
    //        Response.Write("<script language=JavaScript>window.location=\"Default2.aspx\"</script>");*/
    //    }
    //}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -