• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# HtmlControls.HtmlMeta类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlMeta的典型用法代码示例。如果您正苦于以下问题:C# HtmlMeta类的具体用法?C# HtmlMeta怎么用?C# HtmlMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HtmlMeta类属于System.Web.UI.HtmlControls命名空间,在下文中一共展示了HtmlMeta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: lbkUnDisable_Click

 protected void lbkUnDisable_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ddlUsers.SelectedValue))
     {
         if (Membership.GetUser(ddlUsers.SelectedValue).IsApproved == false)
         {
             MembershipUser user = Membership.GetUser(ddlUsers.SelectedValue);
             user.IsApproved = true;
             Membership.UpdateUser(user);
             if (Membership.GetUser(ddlUsers.SelectedValue).IsApproved == true)
             {
                 HtmlMeta meta = new HtmlMeta();
                 meta.HttpEquiv = "Refresh";
                 meta.Content = "2;url=ManageUser.aspx";
                 this.Page.Controls.Add(meta);                        
                 lblComment.Text = "<h4 style='color:green'>User " + ddlUsers.SelectedItem.Text + "'s account is now Undisabled</h4><br/><br/>You will now be redirected in 5 seconds";
             }
         }
         else
         {
             lblComment.Text = "<h4 style='color:green'>User " + ddlUsers.SelectedItem.Text + "'s account is not Disabled.</h4>";
         }
     }
     else
     {
         lblComment.Text = "<h4 style='color:red'>Please Select a User to Undisable</h4>";
     }
 }
开发者ID:saltmktg,项目名称:isbepi.erikson.edu,代码行数:28,代码来源:DisableUser.aspx.cs


示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     User loggedUser = UserOpr.isLogged(Request);
     if (loggedUser == null)
     {
         LoginStatus.Text = "您未登录或登录过期,请重新登录,3秒后跳转到用户登录页面";
         LoginStatus.Visible = true;
         HtmlMeta RedirectMeta = new HtmlMeta(); //重定向用Meta标签
         RedirectMeta.HttpEquiv = "refresh"; //指定行为为跳转
         RedirectMeta.Content = "3;url=" + ReadWebConfig.GetAppSettingValue("LoginPageURL"); //时间为三秒,跳转到首页
         this.Page.Header.Controls.Add(RedirectMeta);
     }
     else
     {
         if (!Page.IsPostBack)
         {
             if (loggedUser.User_isChecked)
             {
                 //已激活
                 LoginStatus.Text = "您已经完成用户激活,无需再次激活";
                 LoginStatus.Visible = true;
             }
             else
             {
                 //未激活
                 UserOpr.SendVerifyMailToNewUser(loggedUser);
                 LoginStatus.Text = "确认信已经发往您登录时所用邮箱,请查收";
                 LoginStatus.Visible = true;
             }
         }
     }
 }
开发者ID:0daydigger,项目名称:Avfun,代码行数:32,代码来源:ResendVerifyMail.aspx.cs


示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Đăng ký đại lý";

            if (!IsPostBack)
            {

                Load_city();
                Load_distric(-1);
                loadYear();
                loadMonth();
                loadDay();

            }
        }
开发者ID:htphongqn,项目名称:esell.yeuthietkeweb.com,代码行数:29,代码来源:Register_Partner.aspx.cs


示例4: InitializePage

        public void InitializePage(string _title, string _description, string _keywords, bool allowRobots)
        {
            string title = "cspad - C# pastebin and code snippets";
            title = title.Substring(0, 1).ToUpper() + title.Substring(1);
            Page.Title = title;

            HtmlMeta keywords = new HtmlMeta();
            keywords.Name = "keywords";
            keywords.Content = HttpUtility.HtmlAttributeEncode(_keywords) + "," +
                               "C#, C Sharp, code, programming, visual studio, snippets, source code";

            HtmlMeta description = new HtmlMeta();
            description.Name = "description";
            description.Content = _description == null ? "" : HttpUtility.HtmlAttributeEncode(_description);

            HeadPlaceHolder.Controls.AddAt(0, description);
            HeadPlaceHolder.Controls.AddAt(1, keywords);

            if (!allowRobots)
            {
                //<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
                HtmlMeta robots = new HtmlMeta();
                description.Name = "robots";
                description.Content = "NOINDEX, FOLLOW";
                HeadPlaceHolder.Controls.AddAt(2, description);
            }
        }
开发者ID:jgimness,项目名称:cspad,代码行数:27,代码来源:Main.Master.cs


示例5: OnPreRender

		protected override void OnPreRender(EventArgs e)
		{
			base.OnPreRender(e);

            //if(!string.IsNullOrEmpty(Name) && !string.IsNullOrEmpty(Content))
            //{
            //    var metaTag = new HtmlMeta();
            //    metaTag.Name = Name;
            //    metaTag.Content = Content;
            //    Page.Header.Controls.Add(metaTag);
            //}

            if ((!string.IsNullOrEmpty(Name) || !string.IsNullOrEmpty(HttpEquiv)) && !string.IsNullOrEmpty(Content))
            {
                var metaTag = new HtmlMeta();

                if (!string.IsNullOrEmpty(HttpEquiv))
                    metaTag.HttpEquiv = HttpEquiv;
                if (!string.IsNullOrEmpty(Name))
                    metaTag.Name = Name;

                metaTag.Content = Content;

                if (InsertFirst)
                    Page.Header.Controls.AddAt(0, metaTag);
                else
                    Page.Header.Controls.Add(metaTag);
            }
		}
开发者ID:goedings,项目名称:VendorLink,代码行数:29,代码来源:Meta.ascx.cs


示例6: UpdataMetagMainTitle

        public static void UpdataMetagMainTitle(System.Web.UI.Control PageView, string title)
        {
            if (title.Trim() == "")
                title = ConfigurationManager.AppSettings["title"];
            else
                title = title + " | " + ConfigurationManager.AppSettings["title"];
            PageView.Page.Title = title;

            HtmlMeta tagAuthor = new HtmlMeta();
            tagAuthor.Attributes.Add("name", "author");
            tagAuthor.Content = ConfigurationManager.AppSettings["author"];
            PageView.Page.Header.Controls.Add(tagAuthor);

            HtmlMeta tagKeywords = new HtmlMeta();
            tagKeywords.Attributes.Add("name", "Keywords");
            tagKeywords.Content = ConfigurationManager.AppSettings["keywords"];
            PageView.Page.Header.Controls.Add(tagKeywords);

            HtmlMeta tagDescription = new HtmlMeta();
            tagDescription.Attributes.Add("name", "description");
            tagDescription.Content = ConfigurationManager.AppSettings["description"];
            PageView.Page.Header.Controls.Add(tagDescription);

            HtmlMeta tagImage = new HtmlMeta();
            tagImage.Attributes.Add("name", "image");
            tagImage.Content = ConfigurationManager.AppSettings["image"];
            PageView.Page.Header.Controls.Add(tagImage);
        }
开发者ID:hoanghcmus,项目名称:tomato,代码行数:28,代码来源:UpdataPageView.cs


示例7: Bind_meta_tags_cat

        public void Bind_meta_tags_cat()
        {
            #region Bind Meta Tags
            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            //Face tags
            HtmlMeta propety = new HtmlMeta();
            HtmlMeta propetyTitle = new HtmlMeta();
            HtmlMeta propetyDesc = new HtmlMeta();
            //Twitter tags
            HtmlMeta propetyTw = new HtmlMeta();
            HtmlMeta propetyTitleTw = new HtmlMeta();
            HtmlMeta propetyDescTw = new HtmlMeta();

            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = Utils.CStrDef(Session["Cat_seo_title"]);
            headerDes.Content = Utils.CStrDef(Session["Cat_seo_desc"]);
            headerKey.Content = Utils.CStrDef(Session["Cat_seo_keyword"]);

            if (string.IsNullOrEmpty(headerDes.Content))
            {
                headerDes.Content = "";
            }
            header.Controls.Add(headerDes);

            if (string.IsNullOrEmpty(headerKey.Content))
            {
                headerKey.Content = "";
            }

            header.Controls.Add(headerKey);
            //Facebook meta
            propety.Attributes.Add("property", "og:image");
            propety.Content = "" + System.Configuration.ConfigurationManager.AppSettings["URLWebsite"] + "" + PathFiles.GetPathCategory(Utils.CIntDef(Session["Cat_id"])) + Utils.CStrDef(Session["Cat_image1"]);
            header.Controls.Add(propety);
            //Title
            propetyTitle.Attributes.Add("property", "og:title");
            propetyTitle.Content = Utils.CStrDef(Session["Cat_seo_title"]);
            header.Controls.Add(propetyTitle);
            //Desc
            propetyDesc.Attributes.Add("property", "og:description");
            propetyDesc.Content = Utils.CStrDef(Session["Cat_seo_desc"]);
            header.Controls.Add(propetyDesc);
            //Twitter meta
            propetyTw.Attributes.Add("property", "twitter:image");
            propetyTw.Content = "" + System.Configuration.ConfigurationManager.AppSettings["URLWebsite"] + "" + PathFiles.GetPathCategory(Utils.CIntDef(Session["Cat_id"])) + Utils.CStrDef(Session["Cat_image1"]);
            header.Controls.Add(propetyTw);
            //Title
            propetyTitleTw.Attributes.Add("property", "twitter:title");
            propetyTitleTw.Content = Utils.CStrDef(Session["Cat_seo_desc"]);
            header.Controls.Add(propetyTitleTw);
            //Desc
            propetyDescTw.Attributes.Add("property", "twitter:description");
            propetyDescTw.Content = Utils.CStrDef(Session["Cat_seo_desc"]);
            header.Controls.Add(propetyDescTw);
            #endregion
        }
开发者ID:htphongqn,项目名称:ecobuild,代码行数:60,代码来源:Main-en.aspx.cs


示例8: Bind_meta_tags_news

        public void Bind_meta_tags_news()
        {
            #region Bind Meta Tags
            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            HtmlMeta propety = new HtmlMeta();

            headerDes.Name = "Description";
            headerKey.Name = "Keywords";
            header.Title = Utils.CStrDef(Session["News_seo_title"]);
            headerDes.Content = Utils.CStrDef(Session["News_seo_desc"]);
            headerKey.Content = Utils.CStrDef(Session["News_seo_keyword"]);
            propety.Attributes.Add("property", "og:image");
            propety.Content = "caodangngheytebinhduong" + PathFiles.GetPathNews(Utils.CIntDef(Session["News_id"])) + Utils.CStrDef(Session["News_image3"]);
            header.Controls.Add(propety);
            if (string.IsNullOrEmpty(headerDes.Content))
            {
                headerDes.Content = "";
            }
            header.Controls.Add(headerDes);

            if (string.IsNullOrEmpty(headerKey.Content))
            {
                headerKey.Content = "";
            }

            header.Controls.Add(headerKey);

            #endregion
        }
开发者ID:htphongqn,项目名称:truongcaodangngheytebinhduong,代码行数:31,代码来源:Page_Default.aspx.cs


示例9: Bind_meta_tags_cat

        public void Bind_meta_tags_cat()
        {
            #region Bind Meta Tags
            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();

            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = Utils.CStrDef(Session["Cat_seo_title"]);
            headerDes.Content = Utils.CStrDef(Session["Cat_seo_desc"]);
            headerKey.Content = Utils.CStrDef(Session["Cat_seo_keyword"]);

            if (string.IsNullOrEmpty(headerDes.Content))
            {
                headerDes.Content = "";
            }
            header.Controls.Add(headerDes);

            if (string.IsNullOrEmpty(headerKey.Content))
            {
                headerKey.Content = "";
            }

            header.Controls.Add(headerKey);
            #endregion
        }
开发者ID:htphongqn,项目名称:truongcaodangngheytebinhduong,代码行数:28,代码来源:Page_Default.aspx.cs


示例10: AddMeta

 /// <summary>
 /// 添加Meta标签
 /// </summary>
 /// <param name="page">页面</param>
 /// <param name="name">Meta名字</param>
 /// <param name="content">Meta内容</param>
 public void AddMeta(System.Web.UI.Page page, string name, string content)
 {
     HtmlMeta meta = new HtmlMeta();
     meta.Name = name;
     meta.Content = content;
     page.Header.Controls.Add(meta);
 }
开发者ID:aj-hc,项目名称:SZY,代码行数:13,代码来源:CssHelper.cs


示例11: getKeywords

        public static string getKeywords(string strHTMLCode)
        {
            Regex metaregex = new Regex(@"<meta\s*(?:(?:\b(\w|-)+\b\s*(?:=\s*(?:""[^""]*""|'" +
                          @"[^']*'|[^""'<> ]+)\s*)?)*)/?\s*>", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
            List<HtmlMeta> MetaList = new List<HtmlMeta>();


            foreach (Match metamatch in metaregex.Matches(strHTMLCode))
            {
                HtmlMeta mymeta = new HtmlMeta();
                Regex submetaregex = new Regex(@"(?<name>\b(\w|-)+\b)\" +
                              @"s*=\s*(""(?<value>" +
                              @"[^""]*)""|'(?<value>[^']*)'" +
                              @"|(?<value>[^""'<> ]+)\s*)+",
                              RegexOptions.IgnoreCase |
                              RegexOptions.ExplicitCapture);


                foreach (Match submetamatch in submetaregex.Matches(metamatch.Value.ToString()))
                {
                    if (submetamatch.Groups["value"].ToString().ToLower() == "keywords")
                    {
                        //System.Windows.Forms.MessageBox.Show(submetamatch.NextMatch().Groups["value"].ToString().ToLower());
                        //System.Windows.Forms.MessageBox.Show(submetamatch.Groups["value"].ToString().ToLower());
                        //File.WriteAllText(Directory.GetCurrentDirectory() + "\\WebSource.txt", submetamatch.Groups["value"].ToString());
                        return submetamatch.NextMatch().Groups["value"].ToString();
                    }
                }
            }
            return "";
        }
开发者ID:JakeLardinois,项目名称:WebSpider,代码行数:31,代码来源:SpiderDataGetter.cs


示例12: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            //Add meta info
            HtmlMeta meta1;

            meta1 = new HtmlMeta();
            meta1.Name = "robots";
            meta1.Content = "noindex, nofollow";
            Page.Header.Controls.Add(meta1);
            Page.Header.Controls.Add(new LiteralControl("\n"));

            //Show test label if organic link referer
            //Set session variable based on referer
            string useragentstring = "";
            if (Request.ServerVariables["HTTP_USER_AGENT"] != null)
                useragentstring = Request.ServerVariables["HTTP_USER_AGENT"].ToString().ToLower();

            Regex regEx_apple = new Regex("ipod|iphone|ipad");
            Regex regEx_android = new Regex("android");
            if (regEx_apple.Match(useragentstring).Success)
            {
                Response.Redirect("http://itunes.apple.com/us/app/best-pick-reports/id494057962?mt=8");
            }

            if (regEx_android.Match(useragentstring).Success)
            {
                Response.Redirect("https://play.google.com/store/apps/details?id=com.brotherfish");
            }
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:29,代码来源:mobileredirect.aspx.cs


示例13: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
                header.Title = "Giới thiệu";

                headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION;
                header.Controls.Add(headerDes);

                headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD;
                header.Controls.Add(headerKey);
            }
            else
            {
                header.Title = "Enews Standard V1.0";

                headerDes.Content = "Enews Standard V1.0";
                header.Controls.Add(headerDes);

                headerKey.Content = "Enews Standard V1.0";
                header.Controls.Add(headerKey);
            }
        }
开发者ID:htphongqn,项目名称:ecobuild,代码行数:32,代码来源:intro.aspx.cs


示例14: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            _iUserID = Utils.CIntDef(Session["USER_ID"]);
                if (_iUserID == 0) Response.Redirect("/");
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Thông tin cá nhân";
            if (!IsPostBack)
            {
                Load_city();
                Load_distric(-1);
                Loaduser_info();
            }
        }
开发者ID:htphongqn,项目名称:esell.yeuthietkeweb.com,代码行数:26,代码来源:User-address.aspx.cs


示例15: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Thanh toán";
            Guid _guid = (Guid)Session["news_guid"];
            if (!pay.Check_Cart(_guid))
            {
                Response.Redirect("/", false);
            }
            loadBanking();
            loadCast();
        }
开发者ID:htphongqn,项目名称:esell.yeuthietkeweb.com,代码行数:25,代码来源:Payment-step3.aspx.cs


示例16: Bind_meta_tags_index

        public void Bind_meta_tags_index()
        {
            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
                header.Title = _configs.ToList()[0].CONFIG_TITLE;

                headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION;
                header.Controls.Add(headerDes);

                headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD;
                header.Controls.Add(headerKey);
            }
            else
            {
                header.Title = "Enews Standard V1.0";

                headerDes.Content = "Enews Standard V1.0";
                header.Controls.Add(headerDes);

                headerKey.Content = "Enews Standard V1.0";
                header.Controls.Add(headerKey);
            }
        }
开发者ID:htphongqn,项目名称:kibitravel,代码行数:32,代码来源:Home-en.aspx.cs


示例17: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            Guid _guid = (Guid)Session["news_guid"];
            if (!IsPostBack)
            {
                Load_Cart(_guid);
                Lbtotal.Text =Lbtotal2.Text = fm.FormatMoney(cart.Total_Amount(_guid));

            }
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Giỏ hàng";
        }
开发者ID:htphongqn,项目名称:esell.yeuthietkeweb.com,代码行数:25,代码来源:cart-result.aspx.cs


示例18: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            _id1 = Utils.CIntDef(Request["id1"]);
            _id2 = Utils.CIntDef(Request["id2"]);
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "So sánh";
            if (!IsPostBack)
            {
                getInfo(_id1, Hyname1, Hyperimg1, Lbdesc1, Lbprice1, Lbbaohanh1, Lbxuatxu1, lbthuonghieu1);
                getInfo(_id2, Hyname2, Hyperimg2, Lbdesc2, Lbprice2, Lbbaohanh2, Lbxuatxu2, lbthuonghieu2);
            }

        }
开发者ID:htphongqn,项目名称:ketnoitructuyen.com,代码行数:26,代码来源:Page-so-sanh.aspx.cs


示例19: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
            }

            HtmlHead header = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();
            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Đăng ký";

            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Utils.CStrDef(HttpContext.Current.Session["User_ID"])))
                {
                    Response.Redirect("trang-chu.html");
                }
                Loadcity();
                Loadyear();
            }
        }
开发者ID:htphongqn,项目名称:dichvuviettel.com.vn,代码行数:28,代码来源:register.aspx.cs


示例20: cmdRegister_Click

        /// <summary>
        /// Registers a user given the textbox inputs
        /// </summary>
        protected void cmdRegister_Click(object sender, EventArgs e)
        {
            if (txtPassword.Text != txtCPassword.Text)
            {
                Response.Write("Passwords do not match");
                return;
            }

            var mysql = new SqlConnector("db_trackvideowatching");

            var users =
                (DataTable)
                    mysql.Select("Select Username, EmailAddress From tbl_users WHERE Username = '" + txtUsername.Text +
                                 "' OR EmailAddress = '" +
                                 txtEmail.Text + "';");
            if (users.Rows.Count != 0)
            {
                Response.Write("A user already exists with this username/email");
                return;
            }

            var salt = Utilities.GenerateSaltValue();

            var password = Utilities.HashPassword(txtPassword.Text, salt, MD5.Create());

            mysql.NonQuery("INSERT INTO tbl_users ( Username, Password_hash, Salt, EmailAddress) VALUES ('" +
                           txtUsername.Text + "','" + password + "','" + salt + "','" + txtEmail.Text + "');");

            HtmlMeta meta = new HtmlMeta();
            meta.HttpEquiv = "Refresh";
            meta.Content = "5;url=Login.aspx";
            Page.Controls.Add(meta);
            Response.Write("Account Creation Successfull, you will now be redirected");
        }
开发者ID:moverperfect,项目名称:Track-Video-Watching,代码行数:37,代码来源:Register.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HtmlControls.HtmlTable类代码示例发布时间:2022-05-26
下一篇:
C# HtmlControls.HtmlLink类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap