razorengine

    0熱度

    1回答

    我有兩個應用程序。其中一個是網絡應用程序,另一個是移動應用程序。我正在嘗試從網絡應用程序解析其中一個視圖,併爲移動應用程序編譯一個html文件。我認爲在Web應用程序的結構如下 App.cshtml partialview1.cshtml partialview2.cshtml .... 該Web應用程序內置在asp.net mvc中,我正在使用Microsoft Visual Studio Co

    0熱度

    1回答

    我正在使用剃鬚刀引擎來解析.cshtml文件。我正在嘗試將基本模板文件更改爲System.Web.WebPages.WebPageBase。我已經發現了剃刀發動機有這件事情,我可以設置基本模板 config.BaseTemplateType = typeof(MyCustomTemplateBase<>); 的問題是,我不能將它直接System.Web.WebPages.WebPageBase

    0熱度

    1回答

    如何將var傳遞給函數? 我需要建立以下未知的數據模型,並將它傳遞給我的功能,它使用喊解析RazorRenderer它: var emailData = new {name="value" , name2="value2" ... , nameN="valueN"} 功能不能接收無功,所以我們使用的對象,但隨後我們不能把它轉換回來,我們得到一個異常時,調用: string htmlBody =

    0熱度

    1回答

    我試圖在類庫項目中配置Postal。爲此,我需要配置自定義EmailService。在郵政網頁有這樣做的一個片段: // Get the path to the directory containing views var viewsPath = Path.GetFullPath(@"..\..\Views"); var engines = new ViewEngineCollection(

    0熱度

    2回答

    我正在使用RazorEngine評估一些JavaScript代碼,並遇到無法編譯的問題。這裏有一個例子: var someBarChart = d3.select("@Model.DivId").append("svg") .attr("width", barChartWidth + barChartMargin.left + barChartMargin.right) .attr("heig

    1熱度

    1回答

    我使用RazorEngine和模板功能將某些頁面製作爲default.cshtml。這些default.cshtml對於一些HTML/JS/CSS代碼和1-2行MVC if/else塊非常簡單。我需要將這些文件部署到MVC項目之外,並直接在運行4.5.2框架的空白asp.net網站下進行部署。 您能否讓我知道什麼應該是web.config條目以及哪些程序集文件將被部署在bin文件夾中。僅供參考:如

    0熱度

    1回答

    public class CityDto : IEnumerable<CityDto> { public IEnumerator<CityDto> AllCities { get; set; } private List<CityDto> _CityDto; public IEnumerator<CityDto> GetEnumerator() {

    2熱度

    3回答

    我正在使用南希在Mac上的項目,我正在編輯我的項目使用標準的文本編輯器(Atom)。我想使用Razor View Engine,並試圖弄清楚如何。 我包括 在依賴Nancy.Viewengines.Razor": "1.3.0"我 project.json文件 using Nancy.ViewEngines.Razor;我HomeModule.cs 文件 @inherits Nancy.ViewE

    0熱度

    1回答

    我想添加圖標並更改劍道網格按鈕的大小。該發動機是剃刀這裏是代碼: @(Html.Kendo().Grid<WEB02.ConfigurationModel.TestGrid>() .Name("grid") .Columns(columns => { columns.Bound(o => o.Name).Width(110); columns.Bound(o => o.

    1熱度

    1回答

    我想用剃刀將圖片添加到我的電子郵件中。從我的App_Data文件夾 <img src="@Url.Content("~/app_data/picture.png")" /> 使用此代碼,但剃刀不斷拋出此錯誤: Errors while compiling a Template. Please try the following to solve the situation: