0

I don't know how to use the razor code in my asp.net project. I am reading this tutorial w3school , but when i write the code in my "defaul.aspx" file then it can't run. can any one please tell me that how exactly to use the razor code in ASP.NET

8
  • Did you install the razor packages from Nuget? Razor files end in something like .cshtml Commented Feb 11, 2014 at 10:12
  • @BenPretorius NO, i have't installed that, even i don't know how to use the razor in asp.net, i am a bit new in asp.net, can you give some suggestion? Commented Feb 11, 2014 at 10:14
  • 1
    You might as well start with this:) asp.net/mvc Commented Feb 11, 2014 at 10:16
  • @BenPretorius can we not use the razor code in ASP.NET WP model? Commented Feb 11, 2014 at 10:19
  • 1
    You should be able to use it with ASP.NET. It is just a view engine that parse your views. The reason why it is not part of WebForms is the fact that it's core role is focused towards the MVC Pattern. Commented Feb 11, 2014 at 10:21

1 Answer 1

1

When you want to work with Razor in your asp.net Project, then you should create ".cshtml" file like Page.cshtml, write down all the code of Razor there. WebMatrix is a tool through which you can also create professional website of asp.net, and where you would have to handle the Razor. for further detail please see this liknk Razor in Asp.net

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.