Create a URL in a template using RazorEngine
Useing the RazorEngine library from here - http://razorengine.codeplex.com/. I'm trying to create a URL with parameters where the parameters value comes from the @Model. This is the HTML I use for the URL:
<p>http://@Model.WebsiteURL/login.aspx?bookingid=@model.BookingID&user=@Model.EmailParent&password=@Model.Password&ReturnUrl=betaling.aspx</p>
But when the Razor engine try to parse the template I get this error: "Only one 'model' statement is allowed in a file." Do I remove the @model.??? so that it only is used ones it is OK.
How do I create this URL.
Thanks in advance
Anders Pedersen
<p>http://@Model.WebsiteURL/login.aspx?bookingid=@model.BookingID&user=@Model.EmailParent&password=@Model.Password&ReturnUrl=betaling.aspx</p>
请注意“@ model.BookingID”中的小“m”...它需要成为大写字母M.
链接地址: http://www.djcxy.com/p/65104.html