<!-- A user control that implements an interface. -->
<%@ Control language="C#" ClassName="CalendarUserControl" %>
<%@ implements
interface="System.Web.UI.WebControls.WebParts.IWebPart" %>
<script runat="server">
private string m_Description;
private string m_Title;
private string m_TitleIconImageUrl;
private string m_TitleUrl;
private string m_CatalogIconImageUrl;
[Personalizable]
public string Description
{
get
{
object objTitle = ViewState["Description"];
if (objTitle == null)
return String.Empty;
return (string)objTitle;
}
set
{
ViewState["Description"] = Server.HtmlEncode(value);
}
}
[Personalizable]
public string Title
{
get
{
object objTitle = ViewState["Title"];
if (objTitle == null)
return String.Empty;
return (string)objTitle;
}
set
{
ViewState["Title"] = Server.HtmlEncode(value);
}
}
public string Subtitle
{
get
{
object objSubTitle = ViewState["Subtitle"];
if (objSubTitle == null)
return "Acme Corp";
return (string)objSubTitle;
}
}
[Personalizable]
public string TitleIconImageUrl
{
get
{
object objTitle = ViewState["TitleIconImageUrl"];
if (objTitle == null)
return String.Empty;
return (string)objTitle;
}
set
{
ViewState["TitleIconImageUrl"] = Server.HtmlEncode(value);
}
}
[Personalizable]
public string TitleUrl
{
get
{
object objTitle = ViewState["TitleUrl"];
if (objTitle == null)
return String.Empty;
return (string)objTitle;
}
set
{
ViewState["TitleUrl"] = Server.HtmlEncode(value);
}
}
[Personalizable]
public string CatalogIconImageUrl
{
get
{
object objTitle = ViewState["CatalogIconImageUrl"];
if (objTitle == null)
return String.Empty;
return (string)objTitle;
}
set
{
ViewState["CatalogIconImageUrl"] = Server.HtmlEncode(value);
}
}
</script>
<asp:calendar id="Calendar1" runat="server" />
<!-- A page that registers and hosts the user control. -->
<%@ Page language="C#" %>
<%@ register tagprefix="uc1"
tagname="CalControl"
src="~/CalendarUserControl.ascx" %>
<!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>Calendar Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:webpartmanager id="manager1" runat="server" />
<asp:webpartzone id="WebPartZone1" runat="server">
<zonetemplate>
<uc1:CalControl id="CalControl1" runat="server"
title="Personal Calendar"
description="My personal calendar for work." />
</zonetemplate>
</asp:webpartzone>
</form>
</body>
</html>
Aklımda Kalası Kelimeler
* давайте работать вместе
* Zarf ve Mazruf, Zerafet(xHoyratlık) ile aynı kökten(za-ra-fe) gelir
* Bedesten
* Suç subuta ermiştir - Suç sabit olmuştur
webpartmanager etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
webpartmanager etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
4 Ağustos 2011 Perşembe
WebPart oluşturmanın MSDN örneği
Elimizin altında bulunsun
Kaydol:
Kayıtlar (Atom)