code/Athena0.0.1/common/Util/Web/WebViewPageBase.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc.Html;
using System.Reflection;
using Athena.common.Util;
namespace System.Web.Mvc
{
public abstract class WebViewPageBase<T> : WebViewPage<T>
{
protected WebViewPageBase()
: base()
{ }
public string Serialize(object obj)
{
return Json.ToJson(obj);
}
public IHtmlString RawSerialize(object obj)
{
IHtmlString ss = this.Raw(this.Serialize(obj));
return this.Raw(this.Serialize(obj));
}
public IHtmlString Raw(string value)
{
return this.Html.Raw(value);
}
public IHtmlString Raw(object value)
{
return this.Html.Raw(value);
}
public MvcHtmlString Partial(string partialViewName)
{
return this.Html.Partial(partialViewName);
}
public string ContentUrl(string contentPath)/* 将虚拟(相对)路径转换为应用程序绝对路径。 */
{
return this.Url.Content(contentPath);
}
public IHtmlString RefStyle(string contentPath)
{
return this.Html.RefStyle(contentPath);
}
public IHtmlString RefScript(string contentPath)
{
return this.Html.RefScript(contentPath);
}
public HtmlString SelectOptions(IEnumerable<SelectOption> optionList, string defaultText = "--请选择--")
{
return this.SelectOptions((object)optionList, defaultText);
}
public HtmlString SelectOptions(object optionList, string defaultText = "--请选择--")
{
StringBuilder htmlBuilder = new StringBuilder();
后面还有 76 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
