当前位置: 首页>>代码示例>>C#>>正文


C# Encryption.decrypt方法代码示例

本文整理汇总了C#中Encryption.decrypt方法的典型用法代码示例。如果您正苦于以下问题:C# Encryption.decrypt方法的具体用法?C# Encryption.decrypt怎么用?C# Encryption.decrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Encryption的用法示例。


在下文中一共展示了Encryption.decrypt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: button_ServerClick

    protected void button_ServerClick(object sender, EventArgs e)
    {
        Encryption decrypt = new Encryption();
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        if (cookie == null)
        {
            cookie = new HttpCookie("BrowserDate");
            cookie.Value = DateTime.Now.ToString();
            cookie.Expires = DateTime.Now.AddDays(22);
            Response.Cookies.Add(cookie);
        }
        HtmlButton button = (HtmlButton)sender;

        string ID2 = "";

        string message = "";
            if (Request.QueryString["message"] != null)
                message = "<label>" + decrypt.decrypt(Request.QueryString["message"].ToString()) + "</label>";
            else
                message = "<label>" + Session["Message"].ToString() + "</label>";

            //if (Session["str"] != null)
            //    message += "<div style=\"color: red;\">" + Session["str"].ToString() + "</div>";

            if (message.Contains("<savedadsearch>"))
            {
                string[] delim = { "<savedadsearch>ID:" };
                string[] tokens = message.Split(delim, StringSplitOptions.None);

                int i = 0;
                while (tokens[1][i] != '<')
                {
                    ID2 += tokens[1][i];
                    i++;
                }
            }

        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));

        dat.Execute("UPDATE SavedAdSearches SET Live='False' WHERE ID=" + ID2);

        Label label = new Label();
        label.Text = "Your emails feature is disabled";

        MessagePanel.Controls.AddAt(MessagePanel.Controls.IndexOf(button), label);
        MessagePanel.Controls.Remove(button);

        Label label1 = (Label)MessagePanel.FindControl("Label1");
        label1.Text = "<label>Search Saved <br/><br/>";
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:50,代码来源:Message.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlLink lk = new HtmlLink();
        HtmlHead head = (HtmlHead)Page.Header;
        lk.Attributes.Add("rel", "canonical");
        lk.Href = "http://hippohappenings.com/PasswordAlert.aspx";
        head.Controls.AddAt(0, lk);

        HtmlMeta hm = new HtmlMeta();
        hm.Name = "ROBOTS";
        hm.Content = "NOINDEX, FOLLOW";
        head.Controls.AddAt(0, hm);

        Encryption decrypt = new Encryption();
        if (Request.QueryString["message"] != null)
            MessageLabel.Text = decrypt.decrypt(Request.QueryString["message"].ToString());
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:17,代码来源:PasswordAlert.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlMeta hm = new HtmlMeta();
        HtmlHead head = (HtmlHead)Page.Header;
        hm.Name = "ROBOTS";
        hm.Content = "NOINDEX, FOLLOW";
        head.Controls.AddAt(0, hm);

        if (!IsPostBack)
        {
            CountryDropDown.SelectedValue = "223";
            ChangeTheState("223");
            Session["UserCountry"] = "223";
            Encryption decrypt = new Encryption();
            if (Request.QueryString["message"] != null)
                MessageLabel.Text = decrypt.decrypt(Request.QueryString["message"].ToString());
        }

        //VariablesLiteral.Text = "<a style=\"cursor: pointer; font-size: 20px;\" class=\"AddLink\" onclick=\"Search('User.aspx?ID=" + Request.QueryString["ID"].ToString() + "');\">Ok</a>";
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:20,代码来源:CatConfirm.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlMeta hm = new HtmlMeta();
        HtmlHead head = (HtmlHead)Page.Header;
        hm.Name = "ROBOTS";
        hm.Content = "NOINDEX, FOLLOW";
        head.Controls.AddAt(0, hm);

        HtmlLink lk = new HtmlLink();
        lk.Attributes.Add("rel", "canonical");
        lk.Href = "http://hippohappenings.com/Message.aspx";
        head.Controls.AddAt(0, lk);

        Encryption decrypt = new Encryption();
        Label MessageLabel = new Label();

        if (Session["Message"] != null || Request.QueryString["message"] != null)
        {
            string message = "";
            if (Request.QueryString["message"] != null)
                message = "<label>" + decrypt.decrypt(Request.QueryString["message"].ToString()) + "</label>";
            else
                message = "<label>" + Session["Message"].ToString() + "</label>";

            //if (Session["str"] != null)
            //    message += "<div style=\"color: red;\">" + Session["str"].ToString() + "</div>";

            if (message.Contains("<savedadsearch>"))
            {
                string[] delim = { "<savedadsearch>ID:" };
                string[] tokens = message.Split(delim, StringSplitOptions.None);
                string ID2 = "";
                int i = 0;
                while (tokens[1][i] != '<')
                {
                    ID2 += tokens[1][i];
                    i++;
                }

                MessageLabel.Text = tokens[0]+"<label>Your search is now live. You will receive periodic emails with new featured ads matching your criteria. Click the button to disable this feature. You can also modify it in the Searches page later on.<br/>";
                MessageLabel.ID = "Label1";
                Label newLabel = new Label();
                newLabel.Text = "<br/>" + tokens[1].Replace(ID2 + "</savedadsearch>", "") + "</label>";

                HtmlButton button = new HtmlButton();
                button.Style.Value = " cursor: pointer;font-weight: bold;padding:0;padding-bottom: 4px; font-size: 11px;height: 30px; width: 112px;background-color: transparent; color: White; background-image: url('image/PostButtonNoPost.png'); background-repeat:no-repeat; border: 0;";
                button.ServerClick += new EventHandler(button_ServerClick);
                button.Attributes.Add("value", ID2);
                button.Attributes.Add("onmouseover", "this.style.backgroundImage='url(image/PostButtonNoPostHover.png)'");
                button.Attributes.Add("onmouseout", "this.style.backgroundImage='url(image/PostButtonNoPost.png)'");
                button.InnerText = "Disable";

                MessagePanel.Controls.Add(MessageLabel);
                MessagePanel.Controls.Add(button);
                MessagePanel.Controls.Add(newLabel);
            }
            else
            {
                MessageLabel.Text = message;
                MessagePanel.Controls.Add(MessageLabel);
            }

        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:64,代码来源:Message.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlLink lk = new HtmlLink();
        HtmlHead head = (HtmlHead)Page.Header;
        lk.Attributes.Add("rel", "canonical");
        lk.Href = "http://hippohappenings.com/CompleteRegistration.aspx";
        head.Controls.AddAt(0, lk);

        if (Request.QueryString["ID"] != null)
        {
            Encryption decrypt = new Encryption();
            EmailLabel.Text = decrypt.decrypt(Request.QueryString["ID"].ToString());

            if (!IsPostBack)
            {
                CountryDropDown.SelectedValue = "223";
                ChangeTheState("223");
                Session["UserCountry"] = "223";
                if (Request.QueryString["message"] != null)
                    MessageLabel.Text = decrypt.decrypt(Request.QueryString["message"].ToString());
            }
        }
        else
        {
            Response.Redirect("Home.aspx");
        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:27,代码来源:CompleteRegistration.aspx.cs


注:本文中的Encryption.decrypt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。