you can create c# class library in a folder (let it name be htmlhelpers) and put a method which returns a string holds the input u need like this "" and so on this method must be extension method < extension()>_ so u can use it into ur html code in the view page u just have to inherit the class u wrote and use the method which return this string .