Control/MemberLogin.ascx.cs

(开头部分) 3KB

这里只显示每个文件的开头 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 System.Data.SqlClient;

public partial class UserControl_MemberLogin : System.Web.UI.UserControl
{
    SqlConnection sqlconn = new SqlConnection( ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["MName"] != null)
            {
              
                table2.Visible = true;
                TABLE1.Visible = false;
                MName.Text = Session["MName"].ToString();
                Label1.Text = Session["Roule"].ToString();
                if (Session["Roule"].ToString() == "买家")
                {
                    TABLE3.Visible = true;
                    Table4.Visible = false;
                }
                else
                {
                    TABLE3.Visible = false;
                    Table4.Visible = true;

                }
            }
            else
            {
                TABLE3.Visible = false;
                Table4.Visible = false;
            }
        }
    }
    protected void lbtnLogout_Click(object sender, EventArgs e)
    {
        table2.Visible = false;
        TABLE1.Visible = true;
        txtMName.Text = "";
        txtMPwd.Text = "";
        FormsAuthentication.SignOut();//清除验证信息
        HttpContext.Current.Session.Clear();//清除Session内容
        HttpContext.Current.Session.Abandon();//取消当前会话
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (DropDownList1.SelectedValue == "买家")
        {
            sqlconn.Open();
后面还有 55 行代码,购买后查看完整代码

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

AI 解读 AI

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

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