Where is the Source Code for Html.TextBoxFor

Solution 1

Get reflector (version 6. should be somewhere available for free), open System.Web.Mvc.dll and search for InputExtensions


Get mvc source code, open in visual studio, and search for InputExtensions

edit: misread the question..

I guess you are looking for InputExtensions.cs line: 371

tagBuilder.MergeAttributes(htmlHelper.GetUnobtrusiveValidationAttributes(name, metadata));

Solution 2

You don't need to download the source code or use reflector extensions.

If you "go to definition" (F12), you should see the file metadata, which is the summarized method declarations. From there, hover over the tab, and you should see the (local) file path where the method came from, which also corresponds to the namespace. With that, you'll be able to look it up from the MVC source code on Codeplex:


Author by


Updated on June 13, 2022


  • Admin
    Admin about 2 months