本文整理汇总了C#中SnCore.SiteMap.SiteMapDataAttribute类的典型用法代码示例。如果您正苦于以下问题:C# SiteMapDataAttribute类的具体用法?C# SiteMapDataAttribute怎么用?C# SiteMapDataAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SiteMapDataAttribute类属于SnCore.SiteMap命名空间,在下文中一共展示了SiteMapDataAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
public void Page_Load()
{
if (!IsPostBack)
{
int id = RequestId;
if (id > 0)
{
TransitAccountPicture tw = SessionManager.AccountService.GetAccountPictureById(SessionManager.Ticket, id);
this.Title = inputName.Text = Renderer.Render(tw.Name);
inputDescription.Text = tw.Description;
inputPictureThumbnail.Src = string.Format("AccountPictureThumbnail.aspx?id={0}&CacheDuration=0", tw.Id);
inputHidden.Checked = tw.Hidden;
discussionComments.DiscussionId = SessionManager.GetCount<TransitDiscussion, string, int>(
typeof(AccountPicture).Name, id, SessionManager.DiscussionService.GetOrCreateDiscussionId);
discussionComments.DataBind();
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request, "AccountPicturesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(tw.Name, Request.Url));
StackSiteMap(sitemapdata);
}
}
SetDefaultButton(manageAdd);
}
示例2: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Flag Types", Request, "SystemAccountFlagTypesManage.aspx"));
DomainClass cs = SessionManager.GetDomainClass("AccountFlagType");
inputName.MaxLength = cs["Name"].MaxLengthInChars;
if (RequestId > 0)
{
TransitAccountFlagType t = SessionManager.AccountService.GetAccountFlagTypeById(
SessionManager.Ticket, RequestId);
inputName.Text = t.Name;
sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("New Type", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(manageAdd);
}
示例3: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!SessionManager.IsAdministrator)
{
throw new ManagedAccount.AccessDeniedException();
}
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Settings", Request, "SystemConfigurationsManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Outgoing E-Mail", Request.Url));
StackSiteMap(sitemapdata);
DomainClass cs = SessionManager.GetDomainClass("Configuration");
int len = cs["OptionName"].MaxLengthInChars;
inputServer.MaxLength = len;
inputUsername.MaxLength = len;
inputPassword.MaxLength = len;
inputPort.MaxLength = len;
inputPickupDirectoryLocation.MaxLength = len;
inputDelivery.DataSource = smtpdeliverymethods;
inputDelivery.DataBind();
ListItemManager.TrySelect(inputDelivery, SessionManager.GetCachedConfiguration("SnCore.Mail.Delivery", SmtpDeliveryMethod.Network.ToString()));
inputServer.Text = SessionManager.GetCachedConfiguration("SnCore.Mail.Server", "localhost");
inputUsername.Text = SessionManager.GetCachedConfiguration("SnCore.Mail.Username", string.Empty);
inputPort.Text = SessionManager.GetCachedConfiguration("SnCore.Mail.Port", "25");
inputPickupDirectoryLocation.Text = SessionManager.GetCachedConfiguration("SnCore.Mail.PickupDirectoryLocation", string.Empty);
}
SetDefaultButton(save);
}
示例4: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (RequestId == 0)
{
throw new Exception("Missing place.");
}
gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);
if (!IsPostBack)
{
TransitPlace p = SessionManager.GetInstance<TransitPlace, PlaceService.ServiceQueryOptions, int>(
RequestId, SessionManager.PlaceService.GetPlaceById);
this.Title = string.Format("{0}'s Pictures", Renderer.Render(p.Name));
GetData(sender, e);
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Places", Request, "PlacesView.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(p.Name, Request, string.Format("PlaceView.aspx?id={0}", p.Id)));
sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request.Url));
StackSiteMap(sitemapdata);
}
}
示例5: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TransitAccountEvent p = SessionManager.EventService.GetAccountEventById(
SessionManager.Ticket, AccountEventId, SessionManager.UtcOffset.Ticks);
linkBack.NavigateUrl = string.Format("AccountEventPicturesManage.aspx?id={0}", p.Id);
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Events", Request, "AccountEventsManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(p.Name, Request, string.Format("AccountEventView.aspx?id={0}", p.Id)));
sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request, string.Format("AccountEventPicturesManage.aspx?id={0}", p.Id)));
if (RequestId > 0)
{
TransitAccountEventPicture t = SessionManager.EventService.GetAccountEventPictureById(SessionManager.Ticket, RequestId);
inputName.Text = t.Name;
inputDescription.Text = t.Description;
imageFull.ImageUrl = string.Format("AccountEventPicture.aspx?id={0}&CacheDuration=0", t.Id);
sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("New Picture", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(manageAdd);
}
示例6: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Attributes", Request, "SystemAttributesManage.aspx"));
DomainClass cs = SessionManager.GetDomainClass("Attribute");
inputName.MaxLength = cs["Name"].MaxLengthInChars;
inputDefaultUrl.MaxLength = cs["DefaultUrl"].MaxLengthInChars;
if (RequestId > 0)
{
TransitAttribute t = SessionManager.ObjectService.GetAttributeById(
SessionManager.Ticket, RequestId);
inputName.Text = t.Name;
inputDescription.Text = t.Description;
inputDefaultUrl.Text = t.DefaultUrl;
inputDefaultValue.Text = t.DefaultValue;
imageBitmap.ImageUrl = string.Format("SystemAttribute.aspx?id={0}&CacheDuration=0", t.Id);
imageBitmap.Visible = t.HasBitmap;
sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
}
else
{
imageBitmap.Visible = false;
sitemapdata.Add(new SiteMapDataAttributeNode("New Attribute", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(manageAdd);
}
示例7: Page_Load
public void Page_Load(object sender, EventArgs e)
{
this.addFile.Attributes["onclick"] = this.files.GetAddFileScriptReference() + "return false;";
gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);
if (!IsPostBack)
{
TransitPlace place = SessionManager.PlaceService.GetPlaceById(SessionManager.Ticket, RequestId);
GetData(sender, e);
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Places", Request, "PlacesView.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(place.Name, Request, string.Format("PlaceView.aspx?id={0}", place.Id)));
sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request.Url));
StackSiteMap(sitemapdata);
}
if (!SessionManager.HasVerified())
{
ReportWarning("You don't have any verified e-mail addresses and/or profile photos.\n" +
"You must add/confirm a valid e-mail address and upload a profile photo before uploading place pictures.");
addFile.Enabled = false;
save.Enabled = false;
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Security", "AccountPreferencesManage.aspx#security"));
sitemapdata.Add(new SiteMapDataAttributeNode("Change Password", Request.Url));
StackSiteMap(sitemapdata);
if (!string.IsNullOrEmpty(PasswordHash))
{
int account_id = (RequestId > 0) ? RequestId : SessionManager.Account.Id;
if (!SessionManager.AccountService.IsPasswordValidMd5(
SessionManager.Ticket,
account_id,
PasswordHash))
{
Redirect(string.Format("AccountChangePassword.aspx?ReturnUrl={0}",
Renderer.UrlEncode(ReturnUrl)));
return;
}
panelOldPassword.Visible = false;
}
if (SessionManager.Account.IsPasswordExpired)
{
ReportInfo("Your password has expired. Please change your password.");
}
SetDefaultButton(manageAccountChangePassword);
}
示例9: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Syndication", Request, "AccountFeedsManage.aspx"));
DomainClass cs = SessionManager.GetDomainClass("MadLib");
inputName.MaxLength = cs["Name"].MaxLengthInChars;
if (RequestId > 0)
{
TransitMadLib t = SessionManager.MadLibService.GetMadLibById(
SessionManager.Ticket, RequestId);
inputTemplate.Text = t.Template;
inputName.Text = t.Name;
sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("New MadLib", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(save);
}
示例10: Page_Load
public void Page_Load()
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
if (RequestId > 0)
{
TransitDiscussion td = SessionManager.GetInstance<TransitDiscussion, int>(
RequestId, SessionManager.DiscussionService.GetDiscussionById);
if (td.Personal)
{
sitemapdata.Add(new SiteMapDataAttributeNode(td.ParentObjectName,
string.Format("{0}&ReturnUrl={1}", td.ParentObjectUri, Renderer.UrlEncode(Request.Url.PathAndQuery))));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("Discussions", Request, "DiscussionsView.aspx"));
}
sitemapdata.Add(new SiteMapDataAttributeNode(td.Name, Request,
string.Format("DiscussionView.aspx?id={0}", td.Id)));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("Discussions", Request, "DiscussionsView.aspx"));
}
sitemapdata.Add(new SiteMapDataAttributeNode("Search", Request.Url));
StackSiteMap(sitemapdata);
}
SetDefaultButton(search);
}
示例11: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Surveys", Request, "SystemSurveysManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(Survey.Name, Request, string.Format("SystemSurveyEdit.aspx?id={0}", SurveyId)));
DomainClass cs = SessionManager.GetDomainClass("SurveyQuestion");
inputQuestion.MaxLength = cs["Question"].MaxLengthInChars;
linkBack.NavigateUrl = "SystemSurveyEdit.aspx?id=" + SurveyId.ToString();
if (RequestId > 0)
{
TransitSurveyQuestion tw = SessionManager.ObjectService.GetSurveyQuestionById(
SessionManager.Ticket, RequestId);
inputQuestion.Text = Renderer.Render(tw.Question);
sitemapdata.Add(new SiteMapDataAttributeNode(tw.Question, Request.Url));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("New Question", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(manageAdd);
}
示例12: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
if (RequestId > 0)
{
TransitAccountPropertyGroup tag = SessionManager.AccountService.GetAccountPropertyGroupById(
SessionManager.Ticket, RequestId);
labelName.Text = Render(tag.Name);
labelDescription.Text = Render(tag.Description);
sitemapdata.Add(new SiteMapDataAttributeNode(tag.Name, Request.Url));
}
else
{
labelName.Text = "All Property Groups";
sitemapdata.Add(new SiteMapDataAttributeNode("Properties", Request.Url));
}
StackSiteMap(sitemapdata);
gridManage.DataSource = SessionManager.AccountService.GetAllAccountPropertyValues(
SessionManager.Ticket, SessionManager.AccountId, RequestId);
gridManage.DataBind();
}
SetDefaultButton(save);
}
示例13: Page_Load
public void Page_Load(object sender, EventArgs e)
{
gridFriends.OnGetDataSource += new EventHandler(gridFriends_OnGetDataSource);
if (!IsPostBack)
{
if (RequestId == 0)
{
RedirectToLogin();
return;
}
TransitAccount ta = SessionManager.GetInstance<TransitAccount, int>(
RequestAccountId, SessionManager.AccountService.GetAccountById);
labelName.Text = string.Format("{0}'s Friends Activity", Render(ta.Name));
GetData();
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Friends Activity", Request.Url));
StackSiteMap(sitemapdata);
}
}
示例14: Page_Load
public void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Redirects", Request, "AccountRedirectsManage.aspx"));
DomainClass cs = SessionManager.GetDomainClass("AccountRedirect");
inputSourceUri.MaxLength = cs["SourceUri"].MaxLengthInChars;
inputTargetUri.MaxLength = cs["TargetUri"].MaxLengthInChars;
int id = RequestId;
if (id > 0)
{
TransitAccountRedirect tr = SessionManager.AccountService.GetAccountRedirectById(SessionManager.Ticket, id);
inputSourceUri.Text = tr.SourceUri;
inputTargetUri.Text = tr.TargetUri;
sitemapdata.Add(new SiteMapDataAttributeNode(tr.SourceUri, Request.Url));
}
else
{
sitemapdata.Add(new SiteMapDataAttributeNode("New Redirect", Request.Url));
}
StackSiteMap(sitemapdata);
}
SetDefaultButton(manageAdd);
}
示例15: Page_Load
public void Page_Load(object sender, EventArgs e)
{
gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);
LocationSelector.CountryChanged += new EventHandler(LocationSelector_CountryChanged);
LocationSelector.StateChanged += new EventHandler(LocationSelector_StateChanged);
LocationSelector.CityChanged += new EventHandler(LocationSelector_CityChanged);
if (!IsPostBack)
{
TransitCampaign tc = SessionManager.MarketingService.GetCampaignById(SessionManager.Ticket, RequestId);
campaignName.Text = string.Format("{0}: {1}", Render(tc.Name), campaignName.Text);
GetData(sender, e);
inputAccountPropertyGroup.DataSource = SessionManager.AccountService.GetAccountPropertyGroups(
SessionManager.Ticket, null);
inputAccountPropertyGroup.DataBind();
inputAccountPropertyGroup_SelectedIndexChanged(sender, e);
SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode("Marketing Campaigns", Request, "MarketingCampaignsManage.aspx"));
sitemapdata.Add(new SiteMapDataAttributeNode(tc.Name, Request, string.Format("MarketingCampaignEdit.aspx?id={0}", tc.Id)));
sitemapdata.Add(new SiteMapDataAttributeNode("Recepients", Request.Url));
StackSiteMap(sitemapdata);
}
}