@(ViewBag.IsEnabled == "0" ? "不存在" : "存在")
@helper Show(int count)
{
if (count == 0)
{
@:存在
}
else
{
@:不存在
}
}
@(ViewBag.IsEnabled == 0 ? "不存在" : "存在")
@Show(0) @*调用helper*@
//自定义函数@functions
@functions{
public IHtmlString Get(int count)
{
string result = "";
if (count == 0)
{
result = "不存在";
}
else
{
result = "存在";
}
return new HtmlString(result);
}
}
@Get(0) //调用的自定义函数
@helper ShowUnit(int count)
{
if (count == 0)
{
@:免费
}
else
{
@count
}
}
@functions {
public static IHtmlString Check(int count)
{
string result = "";
if (count == 0)
{
result = "fsdfsdfsdfd";
}
else
{
result = count.ToString();
}
return new HtmlString(result);
}
}
//自定义函数@functions
@functions{
public static IHtmlString Get(int count)
{
string result = "";
if (count == 0)
{
result = "不存在";
}
else
{
result = "存在";
}
return new HtmlString(result);
}
}
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
<add namespace="WebApplication1" />
</namespaces>
</pages>
</system.web.webPages.razor>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有