UserControls/top.ascx.cs

(开头部分) 2KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class UserControls_top : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //使Enter按钮有效
        Keywords.Attributes.Add("onkeydown", "SubmitKeyClick('top1_ImageButton1');");



        if (Request.Cookies["ShopMember"] != null)
        {
            this.lblWelcome.Text = "欢迎您," + Convert.ToString(Request.Cookies["ShopMember"].Values["MemberAccount"]);
            this.LoginStatus.Text = "<< 退出";
            this.LoginStatus.NavigateUrl = "~/member/admin/login_out.aspx";

            this.Label1.Text = "会员管理后台";
            this.HyperLink1.NavigateUrl = "~/member/admin/admin.aspx";

        }
        else
        {
            this.LoginStatus.Text = "登陆";
            this.LoginStatus.NavigateUrl = "~/member/login.aspx?ReturnUrl=" + System.Web.HttpUtility.UrlEncode("admin/admin.aspx") + "";

            this.Label1.Text = "免费注册";
            this.HyperLink1.NavigateUrl = "~/member/register.aspx";
        }
    }


    protected void Button1_Click(object sender, EventArgs e)
    {
        string keywords = Convert.ToString(Keywords.Text);
        string searchtype = Convert.ToString(SearchType.SelectedItem.Value);
        switch (searchtype)
        {
            case "1":
                Response.Redirect("/supply/?action=SearchSupply&keywords=" + System.Web.HttpUtility.UrlEncode(keywords) + "&searchtype=" + System.Web.HttpUtility.UrlEncode(searchtype) + "");
                break;

            case "2":
                Response.Redirect("/buy/?action=SearchBuy&keywords=" + System.Web.HttpUtility.UrlEncode(keywords) + "&searchtype=" + System.Web.HttpUtility.UrlEncode(searchtype) + "");
                break;

            case "3":
                Response.Redirect("/company/?action=SearchCompany&keywords=" + System.Web.HttpUtility.UrlEncode(keywords) + "&searchtype=" + System.Web.HttpUtility.UrlEncode(searchtype) + "");
                break;
后面还有 11 行代码,解锁后查看完整代码

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

AI 解读

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

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