WebPart.TitleIconImageUrl 속성

정의

컨트롤의 제목 표시줄에서 웹 파트 컨트롤을 나타내는 데 사용되는 이미지의 URL을 가져오거나 설정합니다.

public:
 virtual property System::String ^ TitleIconImageUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.WebControls.WebParts.Personalizable(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)]
public virtual string TitleIconImageUrl { get; set; }
[<System.Web.UI.WebControls.WebParts.Personalizable(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)>]
member this.TitleIconImageUrl : string with get, set
Public Overridable Property TitleIconImageUrl As String

속성 값

제목 표시줄에서 컨트롤을 나타내는 데 사용되는 이미지의 URL 문자열입니다. 기본값은 빈 문자열("")입니다.

구현

특성

예외

내부 유효성 검사 시스템에서 URL에 스크립트 공격이 포함되었을 것으로 판단한 경우

예제

다음 코드 예제를 설정 TitleIconImageUrl 하는 방법에 설명 합니다 사용자 지정 웹 파트 컨트롤에 대 한 속성을 컨트롤의 카탈로그에 이미지와 함께 표시 되도록 컨트롤입니다. 이 예제에서는 클래스 개요의 예제 섹션에서 만든 사용자 지정 컨트롤 TextDisplayWebPart를 사용하는 것으로 WebPart 가정합니다.

웹 페이지의 선언적 태그에서 요소를 확인합니다 <aspSample:TextDisplayWebPart> . 해당 TitleIconImageUrl 특성에는 이미지 파일에 대한 URL이 포함된 문자열이 할당됩니다. 브라우저에서 페이지를 로드하고 이미지에 합법적인 URL을 제공한 경우 이미지가 컨트롤의 WebPart 제목 표시줄에 나타납니다.

<%@ page language="C#" %>
<%@ register tagprefix="aspSample" 
             Namespace="Samples.AspNet.CS.Controls" 
             Assembly="TextDisplayWebPartCS"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server" />
    <asp:webpartzone
      id="WebPartZone1"
      runat="server"
      title="Zone 1"
      PartChromeType="TitleAndBorder">
        <parttitlestyle font-bold="true" ForeColor="#3300cc" />
        <partstyle
          borderwidth="1px"   
          borderstyle="Solid"  
          bordercolor="#81AAF2" />
        <zonetemplate>
          <aspSample:TextDisplayWebPart 
            runat="server"   
            id="textwebpart" 
            title = "Text Content WebPart" 
            TitleIconImageUrl="MyImage.gif" />
        </zonetemplate>
    </asp:webpartzone>
  </form>
</body>
</html>
<%@ page language="VB" %>
<%@ register tagprefix="aspSample" 
             Namespace="Samples.AspNet.VB.Controls" 
             Assembly="TextDisplayWebPartVB"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server" />
    <asp:webpartzone
      id="WebPartZone1"
      runat="server"
      title="Zone 1"
      PartChromeType="TitleAndBorder">
        <parttitlestyle font-bold="true" ForeColor="#3300cc" />
        <partstyle
          borderwidth="1px"   
          borderstyle="Solid"  
          bordercolor="#81AAF2" />
        <zonetemplate>
          <aspSample:TextDisplayWebPart 
            runat="server"   
            id="textwebpart" 
            title = "Text Content WebPart" 
            TitleIconImageUrl="MyImage.gif" />
        </zonetemplate>
    </asp:webpartzone>
  </form>
</body>
</html>

설명

이 속성의 개인 설정 범위는 로 Shared 설정되며 권한 있는 사용자만 수정할 수 있습니다. 자세한 내용은 및 웹 파트 개인 설정 개요를 참조 PersonalizableAttribute 하세요.

적용 대상

추가 정보