Popular Posts
ListSelectionListener & ItemListener import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; import java.awt.event.ItemEvent; import java.awt.event.ItemL... netbean shortcut Ctrl + F:尋找 F3:尋找下一個字串 Ctrl + G:跳到第 N 行 Ctrl + H:取代 Tab:增加縮排 Shift + Tab:減少縮排 Ctrl + E:刪除一行 Ctrl + Shift + I:修正 import 項目 Alt + Ent... Capture response output stream using HttpModule using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Web; namespace TestWebA...
Stats
Custom webpart properties
AwardView.cs
[ToolboxItemAttribute(false)]
public class AwardView : WebPart
{
    [WebBrowsable(true)]
    [Category("Extended")]
    [WebDescription("Shows when items contains no photo")]
    [WebDisplayName("Substitute Photo")]
    [Personalizable(PersonalizationScope.Shared)]
    public string SubstitutePhoto { get; set; }

    // Visual Studio might automatically update this path when you change the Visual Web Part project item.
    private const string _ascxPath = @"~/_CONTROLTEMPLATES/QuarterlyAward/AwardView/AwardViewUserControl.ascx";

    protected override void CreateChildControls()
    {
        Control control = Page.LoadControl(_ascxPath);
        Controls.Add(control);
    }
}
AwardView.webpart (set default value)
<?xml version="1.0" encoding="utf-8"?>
<webParts>
  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    <metaData>
      <type name="QuarterlyAward.AwardView.AwardView, $SharePoint.Project.AssemblyFullName$" />
      <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="Title" type="string">AwardView</property>
        <property name="Description" type="string">My Visual WebPart</property>
        <property name="SubstitutePhoto" type="string">/sites/BruceDev/SiteAssets/Personal.png</property>
      </properties>
    </data>
  </webPart>
</webParts>