TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Create Razor Function in Asp.Net MVC View?
Chandradev Sah
Oct 21, 2014
102.1
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
In this blog you will learn how to Create Razor Function in Asp.Net MVC View.
See given below image:
Razor function is exactly similar to C#/vb.net methods/Function. These features came asp.net MVC 3.0 onward. Here we can write the frequently used functionality inside the function.
Here I will show how to use in Razor function in view.
We have to give function syntax like this:
@functions
{
// Here will be C# method
}
For calling the function Just give
@MethodName
Note:
I hope you are aware of creating view in asp.net MVC.
Next Recommended Reading
ASP.NET MVC 5 Create Shared Razor Layout And ViewStart