zoukankan      html  css  js  c++  java
  • 一个简单的webpart

    首先要安装moss的开发模板。
    using System;
    using System.Runtime.InteropServices;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Serialization;

    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.WebPartPages;

    namespace AjaxWebPart
    {
        [Guid("ce204a6d-448c-426a-9f90-23a021020f66")]
        public class AjaxWebPart : System.Web.UI.WebControls.WebParts.WebPart
        {
            Label label = new Label();
            TextBox tbx = new TextBox();
            Button btn = new Button();

            public AjaxWebPart()
            {
                label.Text = "Hello World budy";
                btn.Text = "show";
                btn.Click += new EventHandler(btn_Click);
            }

            protected override void CreateChildControls()
            {
                base.CreateChildControls();

                // TODO: add custom rendering code here.

                this.Controls.Add(label);
                this.Controls.Add(tbx);
                this.Controls.Add(btn);

            }

            void btn_Click(object sender, EventArgs e)
            {
                this.label.Text = "hello " + tbx.Text;
            }

            private string path = string.Empty;
           
            [WebBrowsable(true)]
            [Personalizable(true)]
            public string Path
            {
                get { return path; }
                set { path = value; }
            }

        }
    }

  • 相关阅读:
    Python使用inspect查看代码参数
    Python的hasattr() getattr() setattr()
    Module-GitBook使用手册
    Module-Hadoop技术文档
    Module-Git使用手册
    Module-Faker使用手册
    Module-Docker使用手册
    Module-DB2技术文档
    Module-Dask并行任务调度
    Module-Apache使用说明
  • 原文地址:https://www.cnblogs.com/chenfulai/p/1125445.html
Copyright © 2011-2022 走看看