本文整理汇总了C#中ContentAPI类的典型用法代码示例。如果您正苦于以下问题:C# ContentAPI类的具体用法?C# ContentAPI怎么用?C# ContentAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentAPI类属于命名空间,在下文中一共展示了ContentAPI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, System.EventArgs e)
{
m_refMsg = m_refCommon.EkMsgRef;
AppImgPath = m_refCommon.AppImgPath;
AppPath = m_refCommon.AppPath;
m_strPageAction = Request.QueryString["action"];
Utilities.SetLanguage(m_refCommon);
MenuLanguage = m_refCommon.ContentLanguage;
MenuId = Convert.ToInt64(Request.QueryString["menuid"]);
if (Request.QueryString["view"] != null)
{
m_strViewItem = Request.QueryString["view"];
}
m_refContent = m_refCommon.EkContentRef;
m_refContentApi = new ContentAPI();
Utilities.SetLanguage(m_refContentApi);
sitePath = m_refCommon.SitePath;
m_strBackPage = Request.QueryString.ToString();
// strip off refresh indicator
if (m_strBackPage.EndsWith("&rf=1"))
{
// refresh is needed after we edit a submenu, but we don't want to keep refreshing if we use the same URL
m_strBackPage = m_strBackPage.Substring(0, m_strBackPage.Length - 5);
}
DisplayPage();
}
开发者ID:jaytem,项目名称:minGit,代码行数:28,代码来源:viewmenu.ascx.cs
示例2: WidgetControls_widget
protected WidgetControls_widget()
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_ApplicationPath = _contentApi.ApplicationPath.TrimEnd(new char[] { '/' });
_SitePath = _contentApi.SitePath.TrimEnd(new char[] { '/' });
}
开发者ID:jaytem,项目名称:minGit,代码行数:7,代码来源:personalization_widget.ascx.cs
示例3: IsCurrentApprover
public bool IsCurrentApprover(long userId, long contentId)
{
ContentAPI m_refContentApi = new ContentAPI();
bool isCurrent = false;
ApprovalData[] approvaldata = null;
if (approvaldata == null)
{
approvaldata = m_refContentApi.GetCurrentApprovalInfoByID(contentId);
}
if ((approvaldata != null) && approvaldata.Length > 0)
{
bool IsLastApproval = System.Convert.ToBoolean(approvaldata[approvaldata.Length - 1].IsCurrentApprover &&
(approvaldata[approvaldata.Length - 1].UserId == m_refContentApi.UserId ||
new UserAPI().IsAGroupMember(m_refContentApi.UserId, approvaldata[approvaldata.Length - 1].GroupId)));
if (IsLastApproval)
{
isCurrent = true;
}
else
{
for (int i = 0; i <= (approvaldata.Length - 1); i++)
{
if (approvaldata[i].IsCurrentApprover)
{
isCurrent = System.Convert.ToBoolean(approvaldata[i].UserId == m_refContentApi.UserId || new UserAPI().IsAGroupMember(m_refContentApi.UserId, approvaldata[i].GroupId));
}
}
}
}
return isCurrent;
}
开发者ID:femiosinowo,项目名称:sssadl,代码行数:32,代码来源:ClientWorkflowUtilities.cs
示例4: GetFolderPath
public string GetFolderPath(long Id)
{
ContentAPI contentAPI = new ContentAPI();
SiteAPI siteAPI = new SiteAPI();
szdavfolder = "ekdavroot";
string sitePath = (string) (siteAPI.SitePath.ToString().TrimEnd(new char[] {'/'}).TrimStart(new char[] {'/'}));
szdavfolder = (string) (szdavfolder.TrimEnd(new char[] {'/'}).TrimStart(new char[] {'/'}));
if (Page.Request.Url.Host.ToLower() == "localhost")
{
szdavfolder = Page.Request.Url.Scheme + Uri.SchemeDelimiter + System.Net.Dns.GetHostName() + "/" + sitePath + "/" + szdavfolder + "_" + siteAPI.UserId + "_" + siteAPI.UniqueId + (((Context.Request.QueryString["LangType"] != null) ? ("_" + Context.Request.QueryString["LangType"].ToString()) : "") ) + "/";
}
else
{
szdavfolder = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + sitePath + "/" + szdavfolder + "_" + siteAPI.UserId + "_" + siteAPI.UniqueId + (((Context.Request.QueryString["LangType"] != null) ? ("_" + Context.Request.QueryString["LangType"].ToString()) : "") ) + "/";
}
string szFolderPath = contentAPI.EkContentRef.GetFolderPath(Id);
szFolderPath = szFolderPath.Replace("\\", "/");
szFolderPath = szFolderPath.TrimStart(new char[] {'/'});
szFolderPath = szFolderPath.Replace("\\\\", "/");
if (szFolderPath.Length > 0)
{
szFolderPath = szdavfolder + szFolderPath + "/";
}
else
{
szFolderPath = szdavfolder;
}
return szFolderPath;
}
开发者ID:jaytem,项目名称:minGit,代码行数:33,代码来源:EditOfficeAsset.aspx.cs
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/javascript";
// initialize additional variables for later use
m_refMsg = m_refSiteApi.EkMsgRef;
// instantiate contentAPI reference
ContentAPI contentApi = new ContentAPI();
// assign the resource text values as needed
jsAddPage.Text = m_refMsg.GetMessage("lbl pagebuilder add page");
jsAppPath.Text = contentApi.AppPath;
jsBack.Text = m_refMsg.GetMessage("back");
jsCancel.Text = m_refMsg.GetMessage("btn cancel");
jsFinish.Text = m_refMsg.GetMessage("btn finish");
jsNext.Text = m_refMsg.GetMessage("btn next");
jsOk.Text = m_refMsg.GetMessage("lbl ok");
jsSavePageAs.Text = m_refMsg.GetMessage("lbl pagebuilder save page");
jsWizardsPath.Text = (contentApi.AppPath + "pagebuilder/wizards/");
jsErrorPageTitle.Text = m_refMsg.GetMessage("lbl pagebuilder error page title");
jsErrorSelectLayout.Text = m_refMsg.GetMessage("lbl pagebuilder error select layout");
jsErrorUrlAlias.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias");
jsErrorUrlAliasExists.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias exists");
jsdropdownMustMatch.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias selection must match");
jsinvalidExtension.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias invalid extension");
jsselectExtension.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias select extension");
jserrorMetadata.Text = m_refMsg.GetMessage("lbl pagebuilder error metadata");
jserrorTaxonomy.Text = m_refMsg.GetMessage("lbl pagebuilder error taxonomy");
jsloading.Text = m_refMsg.GetMessage("lbl sync loading");
jsAddMaster.Text = m_refMsg.GetMessage("lbl Add Master Layout");
}
开发者ID:jaytem,项目名称:minGit,代码行数:31,代码来源:wizardResources.aspx.cs
示例6: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
if (Request.RawUrl.ToLower().Contains("<script"))
{
Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
return;
}
this.RegisterWorkareaCssLink();
this.RegisterDialogCssLink();
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);
this.Title.Text = this.GetMessage("lbl group box");
this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general");
this.RadTabStrip1.Tabs[0].ToolTip = this.RadTabStrip1.Tabs[0].Text + "Tab";
this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab advanced");
this.RadTabStrip1.Tabs[1].ToolTip = this.RadTabStrip1.Tabs[1].Text + "Tab";
this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab relevance");
this.RadTabStrip1.Tabs[2].ToolTip = this.RadTabStrip1.Tabs[2].Text + "Tab";
this.lblAppearance.InnerHtml = this.GetMessage("lbl appearance");
this.lblNoBorder.InnerHtml = this.GetMessage("lbl no border");
this.lblShowBorder.InnerHtml = this.GetMessage("lbl show border");
this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
this.txtCaption.Value = this.GetMessage("lbl fields");
this.sEnterCaption.Text = this.GetMessage("msg enter caption");
}
开发者ID:jaytem,项目名称:minGit,代码行数:34,代码来源:groupbox.aspx.cs
示例7: LoadBalanceManager
/// <summary>
/// Constructor
/// </summary>
/// <param name="context">Current HTTP context</param>
public LoadBalanceManager(HttpContext context)
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_loadBalanceSyncManager = new LoadBalanceSynchronizationManager();
_context = context;
}
开发者ID:femiosinowo,项目名称:sssadl,代码行数:11,代码来源:LoadBalanceManager.cs
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
contentAPI = new ContentAPI();
siteAPI = new SiteAPI();
switch( Request.QueryString["action"])
{
case "getdavurl":
Response.Write(GetSharepointUploadPath());
break;
case "getdetails":
Response.Write(
"showRedistributionStatusCallback(\"" +
EscapeString(GetRedistributionDetails()) +
"\");cleanUp(\"" +
Request.QueryString["cleanupid"] +
"\");");
break;
default:
Response.Write(
"distributeCallback(" +
IsDocumentPromoted().ToString().ToLowerInvariant() +
");cleanUp(\"" +
Request.QueryString["cleanupid"] +
"\");");
break;
}
}
catch (Exception ex)
{
DisplayError(ex.Message);
}
}
开发者ID:jaytem,项目名称:minGit,代码行数:35,代码来源:davurl.aspx.cs
示例9: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
if (EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("<script") | EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("</script"))
{
Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
return;
}
this.RegisterWorkareaCssLink();
this.RegisterDialogCssLink();
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);
this.Title.Text = this.GetMessage("lbl checkbox field");
this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general"); ;
this.RadTabStrip1.Tabs[0].ToolTip = this.GetMessage("tab general") + " Tab"; ;
this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab validation"); ;
this.RadTabStrip1.Tabs[1].ToolTip = this.GetMessage("tab validation") + " Tab"; ;
this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab advanced"); ;
this.RadTabStrip1.Tabs[2].ToolTip = this.GetMessage("tab advanced") + " Tab"; ;
this.lblDefVal.InnerHtml = this.GetMessage("lbl default value");
this.lblDefValT.InnerHtml = this.GetMessage("lbl def val true");
this.lblDefValF.InnerHtml = this.GetMessage("lbl def val false");
this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
}
开发者ID:jaytem,项目名称:minGit,代码行数:32,代码来源:checkboxfield.aspx.cs
示例10: Workarea_MenuActions
public Workarea_MenuActions()
{
m_CommonApi = new CommonApi();
m_ContentApi = new ContentAPI();
m_EkContent = m_ContentApi.EkContentRef;
m_refMsg = m_ContentApi.EkMsgRef;
}
开发者ID:jaytem,项目名称:minGit,代码行数:7,代码来源:MenuActions.aspx.cs
示例11: CatalogEntry_PageFunctions_Js
protected CatalogEntry_PageFunctions_Js()
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
_JsLibrary = new workareajavascript();
_ApplicationPath = _ContentApi.ApplicationPath.TrimEnd(new char[] { '/' });
}
开发者ID:jaytem,项目名称:minGit,代码行数:7,代码来源:CatalogEntry.PageFunctions.aspx.cs
示例12: Page_Init
protected void Page_Init(object sender, EventArgs e)
{
var m_refMsg = new ContentAPI().EkMsgRef;
BackLabel.Text = m_refMsg.GetMessage("btn back");
DeleteLabel.Text = m_refMsg.GetMessage("btn delete");
//Register CSS
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss);
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss);
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronFixedPositionToolbarCss);
Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS);
ltrlStyleSheetJS.Text = _styleHelper.GetClientScript();
_msgHelper = new EkMessageHelper(_contentApi.RequestInformationRef);
Utilities.ValidateUserLogin();
if (_contentApi.RequestInformationRef.IsMembershipUser == 1 || !_contentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminPersonalize)) {
Response.Redirect(_contentApi.ApplicationPath + "reterror.aspx?info=" + _contentApi.EkMsgRef.GetMessage("msg login cms user"), true);
return;
}
BindToolbars();
this.image_link_100.Attributes.Add("onclick", string.Format("return validateList('{0}');", _msgHelper.GetMessage("select target content")));
}
开发者ID:jaytem,项目名称:minGit,代码行数:26,代码来源:TargetContentDelete.aspx.cs
示例13: IsAdvancedWorkflowActive
public static bool IsAdvancedWorkflowActive(long contentId, long folderId, int languageId)
{
var contentApi = new ContentAPI();
var cwfutilties = new ContentWorkflowUtilities(contentApi.RequestInformationRef);
var workflowdefinitionid = cwfutilties.GetInheritedWorkflowDefinitionId(contentId, folderId, languageId);
return (workflowdefinitionid > 0);
}
开发者ID:femiosinowo,项目名称:sssadl,代码行数:7,代码来源:ClientWorkflowUtilities.cs
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
contentAPI = new ContentAPI();
string action = string.Empty;
Utilities.ValidateUserLogin();
RegisterResources();
try
{
if (!contentAPI.IsAdmin())
{
Response.Redirect(contentAPI.ApplicationPath + "reterror.aspx?info=" + contentAPI.EkMsgRef.GetMessage("msg login cms administrator"), true);
return;
}
if (!string.IsNullOrEmpty(Request.QueryString["action"]))
{
action = Request.QueryString["action"].ToString();
}
switch (action.ToLower())
{
case "viewalldeviceconfigurations":
ViewAllDeviceConfigurations m_vd;
m_vd = (ViewAllDeviceConfigurations)(LoadControl("controls/DeviceConfiguration/ViewAllDeviceConfigurations.ascx"));
m_vd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_vd);
break;
case "adddeviceconfiguration":
case "editdeviceconfiguration":
AddEditDeviceConfiguration m_ad;
m_ad = (AddEditDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/AddEditDeviceConfiguration.ascx"));
m_ad.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_ad);
break;
case "viewdeviceconfiguration":
ViewDeviceConfiguration m_vsd;
m_vsd = (ViewDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/ViewDeviceConfiguration.ascx"));
m_vsd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_vsd);
break;
case "reorderdeviceconfigurations":
ReorderDeviceConfigurations m_rd;
m_rd = (ReorderDeviceConfigurations)(LoadControl("controls/DeviceConfiguration/ReorderDeviceConfigurations.ascx"));
m_rd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_rd);
break;
case "deletedeviceconfiguration":
DeleteDeviceConfiguration m_dd;
m_dd = (DeleteDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/DeleteDeviceConfiguration.ascx"));
m_dd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_dd);
break;
}
}
catch (Exception ex)
{
Utilities.ShowError(ex.InnerException.ToString());
}
}
开发者ID:jaytem,项目名称:minGit,代码行数:59,代码来源:Settings.aspx.cs
示例15: Attributes
protected Attributes()
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_MessageHelper = _contentApi.EkMsgRef;
this.SitePath = _contentApi.SitePath.TrimEnd(new char[] { '/' });
this.ApplicationPath = _siteApi.ApplicationPath.TrimEnd(new char[] { '/' });
}
开发者ID:jaytem,项目名称:minGit,代码行数:8,代码来源:Attributes.ascx.cs
示例16: Page_Init
private void Page_Init(System.Object sender, System.EventArgs e)
{
m_refContentApi = new ContentAPI();
Utilities.ValidateUserLogin();
//register page components
this.RegisterJS();
this.RegisterCSS();
}
开发者ID:jaytem,项目名称:minGit,代码行数:8,代码来源:history.aspx.cs
示例17: Membership
protected Membership()
{
_ContentApi = new ContentAPI();
_SiteApi = new SiteAPI();
this.SitePath = _ContentApi.SitePath.TrimEnd(new char[] { '/' });
this.ApplicationPath = _SiteApi.ApplicationPath.TrimEnd(new char[] { '/' });
}
开发者ID:jaytem,项目名称:minGit,代码行数:8,代码来源:Membership.ascx.cs
示例18: Page_Load
protected void Page_Load(object sender, System.EventArgs e)
{
try
{
m_refContentApi = new ContentAPI();
AppImgPath = m_refContentApi.AppImgPath;
m_refMsg = m_refContentApi.EkMsgRef;
Utilities.ValidateUserLogin();
RegisterResources();
if (!(Request.QueryString["folderid"] == null))
{
if (Request.QueryString["folderid"] != "")
{
m_intFolderId = Convert.ToInt64(Request.QueryString["folderid"]);
}
}
if (Request.QueryString["LangType"] != "")
{
ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
}
else
{
if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "")
{
ContentLanguage = int.Parse(m_refContentApi.GetCookieValue("LastValidLanguageID"));
}
}
m_refContentApi.ContentLanguage = ContentLanguage;
SearchStyleSheet = "<link rel=\'stylesheet\' type=\'text/css\' href=\'csslib/worksearch.css\'>" + "\r\n";
StyleSheetJS = m_refStyle.GetClientScript();
if (ProductSearch1 != null)
{
ProductSearch1.CatalogId = m_intFolderId;
ProductSearch1.LanguageID = ContentLanguage;
ProductSearch1.IsInWorkArea = true;
ProductSearch1.DisplayXslt = "Xslt/WA_ProductSearch.xsl";
//ProductSearch1.TemplateProduct = "ProductView.aspx"
}
if (Page.IsPostBack == false)
{
Display_ToolBar();
}
}
catch (Exception ex)
{
if (ex.Message.ToLower().IndexOf("service is not running") != -1)
{
Utilities.ShowError("Error: Index service is not running. You cannot search on Products. Restart the service.");
}
else
{
Utilities.ShowError(ex.Message);
}
}
}
开发者ID:jaytem,项目名称:minGit,代码行数:58,代码来源:productsearch.aspx.cs
示例19: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
m_refMsg = m_refSiteApi.EkMsgRef;
ContentAPI capi = new ContentAPI();
// Register JS
JS.RegisterJSInclude(this, JS.ManagedScript.EktronJS);
JS.RegisterJSInclude(this, JS.ManagedScript.EktronTreeviewJS);
}
开发者ID:jaytem,项目名称:minGit,代码行数:9,代码来源:foldertree.ascx.cs
示例20: Page_Load
private void Page_Load(System.Object sender, System.EventArgs e)
{
try
{
m_refContentApi = new ContentAPI();
if (ContentBlock.EkItem != null)
{
if (ContentBlock.EkItem.Id > 0)
{
Page.Title = ContentBlock.EkItem.Title;
lblLastModifiedBy.Text = string.Format("{0} {1}", ContentBlock.EkItem.LastEditorFname, ContentBlock.EkItem.LastEditorLname);
lblLastModifiedBy.ToolTip = lblLastModifiedBy.Text;
lblLastModifiedDate.Text = ContentBlock.EkItem.DateModified.ToString("MMM-dd-yyyy");
lblLastModifiedDate.ToolTip = lblLastModifiedDate.Text;
if (((int)ContentBlock.EkItem.ContentType > EkConstants.ManagedAsset_Min && (int)ContentBlock.EkItem.ContentType < EkConstants.ManagedAsset_Max) || ((int)ContentBlock.EkItem.ContentType > EkConstants.Archive_ManagedAsset_Min && (int)ContentBlock.EkItem.ContentType < EkConstants.Archive_ManagedAsset_Max))
{
DownloadAssetLink.Text = "<a style=\"text-decoration:none;\" href=\"" + m_refContentApi.SitePath + "assetmanagement/downloadasset.aspx?id=" + ContentBlock.EkItem.AssetInfo.Id + "&LangType=" + ContentBlock.EkItem.Language + "&version=" + ContentBlock.EkItem.AssetInfo.Version + "\"><img border=\"0\" src=\"" + m_refContentApi.ApplicationPath + "images/application/download.gif\" /></a>";
}
else
{
DownloadAssetLink.Visible = false;
}
ContentList.ContentIds = ContentBlock.EkItem.Id.ToString();
if (!string.IsNullOrEmpty(ContentBlock.EkItem.AssetInfo.FileExtension))
{
contentBody.Visible = false;
}
ContentBlock.Text = ContentBlock.Text.Replace("<p> </p>", "");
contentBody.Attributes.Add("style", "border-top: solid 1px #dddddd; margin-bottom: 30px; padding-top: 10px;");
}
else
{
MessageBoard.Visible = false;
SocialBar.Visible = false;
ContentDetails.Visible = false;
ContentList.Visible = false;
DownloadAssetLink.Visible = false;
ContentBlock.Text = "The requested content does not exist or has been deleted.";
ContentBlock.ToolTip = ContentBlock.Text;
contentBody.Attributes.Add("style", "margin-bottom: 30px; padding-top: 10px;");
}
}
}
catch (Exception ex)
{
throw (new Exception(ex.Message));
}
}
开发者ID:jaytem,项目名称:minGit,代码行数:55,代码来源:showcontent.aspx.cs
注:本文中的ContentAPI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论