Put textbox and button in mvc razor app

asp.netasp.net-mvc-3razor

I am working on a test mvc project and since it's my 1st time working in mvc environment I am almost lost and is completely different compared to asp.net web forms.
I am trying to put a textbox and a button on a form, but when I am using <%= Html.TextBox("name") %> for textbox for example, the code displays as a text on the screen and is not rendered as a textbox. When I am using html markup for textbox and button I can see the textbox but shouldn't <%= Html.TextBox("name") %> be correct way to do that?
Here is what I have here:

@{  
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "Welcome to my Web Site!";
}
<p>
    ASP.NET Web Pages make it easy to build powerful .NET based applications for the web.    
    Enter your name:  <%= Html.TextBox("name") %>
    <input id="Text1" type="text" />
    <input id="Button1" type="button" value="button" />
</p>

Which way should I go, can I go with the standard html format or what am I doing wrong that the textbox from <%= Html.TextBox("name") %> doesn't get displayed?
Thanks in advance, Laziale

Best Solution

You are using ASPX syntax. For Razor, it would be something like this:

@Html.TextBox("TextBoxName")

So your code would look like:

<p> 
    ASP.NET Web Pages make it easy to build powerful .NET based applications for the web.     
    Enter your name:  
    @Html.TextBox("name")
    <input id="Button1" type="button" value="button" /> 
</p>