This question is locked. New answers and comments are not allowed.
Hi,
I have a Site that have views That Are Aspx files I want to convert them Into Razor view syntax,So Please guide me How could I Do It,
How I Have change the Asp.net code to Razor View Engine syntax,
For Example If I Have the following code ,Particularly First line What should I do to it to convert to razor syntax
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
IList<string> errors = ViewData["errors"] as IList<string>;
if (errors != null) {
%>
<ul class="error">
<% foreach (string error in errors) { %>
<li><%= Html.Encode(error) %></li>
<% } %>
</ul>
<%
}
string action = "../" + MVC.Account.Name + "/" + MVC.Account.Actions.Logon;
%>
<form method="post" action="<%=action %>">
<fieldset>
<legend>Login</legend>
<div class="explanation">
<p><label for="username">Username</label> </p>
<p><label for="password">Password</label> </p>
</div>
<div class="explanation">
<p><%= Html.TextBox("username") %></p>
<p><%= Html.Password("password") %></p>
<p><input type="submit" value="Login" class="button"/></p>
</div>
</fieldset>
</form>