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


C# System.FindControl方法代码示例

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


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

示例1: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control skin)
 {
     txtContent = (TextBox)skin.FindControl("TextBox1");
     btnOK = (Button)skin.FindControl("Button1");
     txtContent.Text = BWeblog_Notice.GetLatestNotice().Notice_Content;
     btnOK.Click += new EventHandler(btnOK_Click);
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:AddBlogNotice.cs

示例2: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     repeater1 = (RepeaterPaged)Skin.FindControl("repeater1");
     TextBox1 = (TextBox)Skin.FindControl("TextBox1");
     LinkButton1 = (LinkButton)Skin.FindControl("LinkButton1");
     LinkButton1.Click += new EventHandler(LinkButton1_Click);
     DataBind();
     if (blogContext.ID != -1)
     {
         if (BView_WeblogThemeCssFile.CheckExist(blogContext.ID))
         {
             if (!BWeblog_UserCss.CheckHasCssFile(blogContext.BlogUserId))
             {
                 Weblog_UserCss WUC = new Weblog_UserCss();
                 WUC.UserCss_CssFileId = blogContext.ID;
                 WUC.UserCss_UserId = blogContext.BlogUserId;
                 WUC.UserCss_Used = true;
                 BWeblog_UserCss.Insert(WUC);
             }
             else//如果已经有了的话 更新
             {
                 var temp= BWeblog_UserCss.GetByBlogUserId(blogContext.BlogUserId);
                 
                 Weblog_UserCss WUC = new Weblog_UserCss();
                 WUC.UserCss_Id = temp.First().UserCss_Id;
                 WUC.UserCss_CssFileId = blogContext.ID;
                 WUC.UserCss_UserId = blogContext.BlogUserId;
                 WUC.UserCss_Used = true;
                 BWeblog_UserCss.Update(WUC);
             }
             Context.Response.Redirect("/" + blogContext.Owner.User_DomainName);
         }
     }
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:34,代码来源:SelectCss.cs

示例3: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     LogTitle = (TextBox)Skin.FindControl("LogTitle");
     Search = (Button)Skin.FindControl("Search");
     Search.Click += new EventHandler(Search_Click);
     //throw new NotImplementedException();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:SearchLog.cs

示例4: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     Repeater1 = (Repeater)Skin.FindControl("Repeater1");
     Button1 = (Button)Skin.FindControl("Button1");
     Button1.Click += new EventHandler(Button1_Click);
     DataBind();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:Message.cs

示例5: InitializeSkin

        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
          //if(Context.Session["PassWord"]==null||Convert.ToString(Context.Session["PassWord"])=="")
          //{
              
          //    Context.Response.Redirect("Index.aspx?mfiid="+BlogContext.Current.MFiiD+"&afiid="+BlogContext.Current.AFiiD);

          //}
            //if (Convert.ToString(Context.Session["PassWord"]) != BWeblog_log.GetPW(Convert.ToInt32( Context.Request["logid"])))
            //{
            //    Context.Response.Redirect("Index.aspx?mfiid=" + BlogContext.Current.MFiiD + "&afiid=" + BlogContext.Current.AFiiD);
            //}
            EnReply = (Panel)Skin.FindControl("EnReply");
            ReplyAlert = (Literal)Skin.FindControl("ReplyAlert");
            View_WeblogUserLog WL = BWeblog_log.GetByIDAndFiid(blogContext.LogId,blogContext.MFiiD);
            if (WL == null)
            {
                Context.Response.Write("<script>alert('该文章不存在或已经删除!');top.window.location='/" + blogContext.Context.Request.QueryString["Domain"] + "';</script>");
                Context.Response.End();
            }
            if (Convert.ToBoolean(WL.Log_IsEnRePly))
            {
                EnReply.Visible = true;
                ReplyAlert.Visible = false;
            }
            else
            {
                EnReply.Visible = false;
                ReplyAlert.Visible = true;
            }

            Globals.UpdateLogByRssLink(blogContext.BlogUserId);
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:33,代码来源:Comment_Form.cs

示例6: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     repeater1 = (Repeater)Skin.FindControl("repeater1");
     AddCategory = (Button)Skin.FindControl("AddCategory");
     Cate_Name = (TextBox)Skin.FindControl("Cate_Name");
     AddCategory.Click += new EventHandler(AddCategory_Click);
     DataBind();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:Category.cs

示例7: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     TextBox1 = (TextBox)Skin.FindControl("TextBox1");
     Button1 = (Button)Skin.FindControl("Button1");
     Label1 = (Label)Skin.FindControl("Label1");
     Button1.Click += new EventHandler(Button1_Click);
     //throw new NotImplementedException();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:AddBook.cs

示例8: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
    
     CommentName = (TextBox)Skin.FindControl("CommenterName");
     CommentContent = (TextBox)Skin.FindControl("CommentContext");
     YanZhen = (TextBox)Skin.FindControl("YanZhen");
     Add = (Button)Skin.FindControl("Add");
     Cansel = (Button)Skin.FindControl("Cansel");
    
     DataBind();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:AddComment.cs

示例9: InitializeSkin

        //private string querry;


        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {

            //throw new NotImplementedException();

            InputName = (TextBox)Skin.FindControl("Name");
            Search = (Button)Skin.FindControl("Search1");
            DataBind();


        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:14,代码来源:SearchFriend.cs

示例10: InitializeSkin

        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            
            Repeater1 = (Repeater)Skin.FindControl("Repeater1");
            MsgReceiver = (TextBox)Skin.FindControl("MsgReceiver");

            Send = (Button)Skin.FindControl("Send");
            MsgTitle = (TextBox)Skin.FindControl("MsgTitle");
            MsgContent = (TextBox)Skin.FindControl("MsgContent");
            Send.Click += new EventHandler(Send_Click);
            DataBind();
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:12,代码来源:MessageDetail.cs

示例11: InitializeSkin

        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            UserName = (TextBox)Skin.FindControl("UserName");
          Password = (TextBox)Skin.FindControl("Password");
          CheckBox1 = (CheckBox)Skin.FindControl("CheckBox1");
          LinkButton1 = (LinkButton)Skin.FindControl("LinkButton1");
          Label1 = (Label)Skin.FindControl("Label1");

            //保存上一次访问的跳转前的Url
          //Uri url = System.Web.HttpContext.Current.Request.UrlReferrer;
          //Context.Response.Write("我来测试一下~~"+url);
          //if (url != null)
          //{
          //    string UrlStr = url.ToString().ToLower();
          //    if (!UrlStr.Contains("blog.ncuhome.cn/firend.aspx"))
          //    {
          ////        if(UrlStr.Contains("blog.ncuhome.cn/manage"))
          ////            if (UrlStr != "http://blog.ncuhome.cn" && UrlStr != "http://blog.ncuhome.cn/" && UrlStr != "http://blog.ncuhome.cn/default.aspx" && UrlStr != "http://blog.ncuhome.cn/manage" && UrlStr != "http://blog.ncuhome.cn/manage/default.aspx")
          ////        {
          //        HttpContext.Current.Session["UrlStr"] = UrlStr;
          ////        }
          ////            else
          ////            {
          ////                HttpContext.Current.Session["UrlStr"] = null;
          ////            }
          //    }
          //    else
          //    {
          //        HttpContext.Current.Session["UrlStr"] = null;
          //    }
          //}
          LinkButton1.Click += new EventHandler(LinkButton1_Click);
          if (blogContext.User.IsLogin)
          {
              BWeblog_User.AddLoginTimes(blogContext.User.UserInfo.User_Id);
              if (BView_WeblogThemeDetail.GetByBlogUserId(blogContext.User.UserInfo.User_Id)==null)
              {
                  HttpContext.Current.Response.Write("<script>alert('您还没有设置您的个性模板!');window.location='/" + blogContext.User.UserInfo.User_DomainName + "/Manage/selecttheme.aspx';</script>");
                  HttpContext.Current.Response.End();
              }
              if (HttpContext.Current.Session["toDomain"] != null)
              {
                  string RedDomain=Convert.ToString(HttpContext.Current.Session["toDomain"]);
                  HttpContext.Current.Session["toDomain"] = null;
                  System.Web.HttpContext.Current.Response.Redirect("/Manage/sendmessage/" + blogContext.User.UserInfo.User_DomainName + "-to-" + RedDomain + ".html");
              }
              else
              {
                  System.Web.HttpContext.Current.Response.Redirect("/" + blogContext.User.UserInfo.User_DomainName + "/Manage/Default.aspx");
              }
          }

        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:53,代码来源:Login.cs

示例12: InitializeSkin

        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            MsgReceiver = (TextBox)Skin.FindControl("MsgReceiver");

            Send = (Button)Skin.FindControl("Send");
            MsgTitle = (TextBox)Skin.FindControl("MsgTitle");
            MsgContent = (TextBox)Skin.FindControl("MsgContent");
            Literal1 = (Literal)Skin.FindControl("Literal1");
            if (blogContext.ID != -1)
                MsgReceiver.Text = BWeblog_User.GetByFIID(blogContext.ID).User_NickName;
            Send.Click += new EventHandler(Send_Click);
            DataBind();
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:13,代码来源:SendBox.cs

示例13: InitializeSkin

        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            CT = (TextBox)Skin.FindControl("Article");
            Alert = (Literal)Skin.FindControl("Literal1");
            Submit = (Button)Skin.FindControl("Submit");
            var Content=BNotice.GetNotice(blogContext.MFiiD);
            if (Content.Length > 0)
            {
                CT.Text = Content[0].Ntc_Content;
            }
            //CT.Text = Convert.ToString( BNotice.GetNotice(blogContext.MFiiD));

            Submit.Click += new EventHandler(Submit_Click);
            
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:15,代码来源:Manage_Notice.cs

示例14: modify_leftnav

        public static void modify_leftnav(System.Web.UI.Page page, StringCollection items_visible, StringCollection items_invisible)
        {
            Control leftnav = page.FindControl("leftnavElement");

            if (leftnav != null)
            {
                foreach (Control td_c in leftnav.Controls)
                {
                    if (td_c.ID != null)
                    {
                        bool helper = false;

                        foreach (string id in items_visible)
                        {
                            if (td_c.ID.StartsWith(id) == true)
                            {
                                helper = true;
                            }
                        }


                        if (items_invisible.Contains(td_c.ID))
                        {
                            helper = false;
                        }

                        td_c.Visible = helper;
                    }
                }
            }
        }
开发者ID:amalapannuru,项目名称:RFC,代码行数:31,代码来源:page_utilities.cs

示例15: InitializeSkin

 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     if (Context.Request["DeleteCommentId"] != null)
     {
         if (BWeblog_Comment.DeleteByID(Convert.ToInt32(Context.Request["DeleteCommentId"])))
         {
             BWeblog_User.SetUserCommentCount(blogContext.BlogUserId);
             BWeblog_log.SetLogCountByUID(blogContext.BlogUserId);
             Context.Response.Write("<script>alert('删除成功!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>");
         }
         else
         {
             Context.Response.Write("<script>alert('删除失败!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>");
         }
     }
     repeater1 = (RepeaterPaged)Skin.FindControl("Repeater1");
     if (Context.Request["logid"] != null)
     {
         DataBind();
     }
     else
     {
         System.Web.HttpContext.Current.Response.Redirect("/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx");
     }
     //else
     //{
     //    Context.Response.Write("<script>alert('你没有权限!');</script>");
     //    Context.Response.End();
     //}
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:30,代码来源:Comments.cs


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