Questions tagged [t4mvc]

T4MVC is an open source utility for Microsoft ASP.NET MVC. It allows replacing magic strings in Views, Controllers and Links to content with strong names/types.

T4MVC is an open source utility for Microsoft ASP.NET MVC. It allows replacing magic strings in Views, Controllers and Links to content with strong names/types.

Resources

245 questions
0
votes
1 answer

'The Type or namespace name 'T4MVC_MyController' does not exists in the namespace 'MyProject.Controllers.My' (are you missing an assembly reference?)

I just cloned an new project, started the npm and when I rebuild I got several similiar errors, in the error list like the following: How can I solve it?
Simon Azzopardi
  • 121
  • 1
  • 3
  • 8
0
votes
1 answer

MVC 3.0 T4MVC stopped working in VS 2010

Yesterday I was having fully compiled ASP.NET MVC 3.0 project. Today when i opened my project again it is wont compiled because of T4MVC, I was very surprised. I readd the T4MVC template thorough NuGet again, but it is didn't help. Then i removed…
angularrocks.com
  • 26,767
  • 13
  • 87
  • 104
0
votes
1 answer

Javascript reuse with ASP.NET MVC extensions

I have two views (create/edit) that require the same javascript for client-side functions. I want to place my javascript into a separate file so I can reference/reuse the script on both my views but I cannot do this because I am using MVC extension…
mr.coffee
  • 962
  • 8
  • 22
0
votes
1 answer

MVC ASP.Net: List not being picked up properly

I've been trying to add a new page to an already existing web project that uses T4MVC in ASP.Net as well as Razor. Everything runs smoothly except for this one bug: when I submit my form, the list in the viewmodel is null, as if it couldn't create…
mgrandmont
  • 35
  • 6
0
votes
3 answers

How route for generation outgoing URL is chosen in ASP.NET MVC?

Good day! I'm using ASP.NET MVC 2 and T4MVC and it seems some code magic is happening When I add this to routes table: routes.MapRoute( "Login", "login/", MVC.Profile.Login() ); How does framework know that I want this rule to apply…
artvolk
  • 9,448
  • 11
  • 56
  • 85
0
votes
2 answers

T4 MVC 3 templates generates 88 errors

I have downloaded the following zip. http://www.palmmedia.de/Blog/Download/f0f3664d-3199-4095-bb15-815cf9f3ef2e I did update the MVCSitemap packige in the website project by NUGET. After that I get a lot of errors (88) generated by my t4 template.…
Marco
  • 4,817
  • 5
  • 34
  • 75
0
votes
1 answer

t4mvc - getting the value of a dropdownlist into the ActionResult parameters in Ajax.BeginForm

I must be missing something, but... Say I have the following Ajax form: using (Ajax.BeginForm(MVC.Admin.TutorEditor.AddTutorCourse(Model.TutorName, TutorRoleId, CourseId), new AjaxOptions { …
awrigley
  • 13,481
  • 10
  • 83
  • 129
0
votes
1 answer

How to use T4MVC with StructureMap?

How to use T4MVC with StructureMap? I've used T4MVC to kill the magic strings in my application. T4 generated some classes to handle that. I need to use StructureMap with these generated classes.
Hassan
  • 311
  • 1
  • 17
0
votes
2 answers

AspNetMvc appends url when navigating between two different routes

I have an area named adpan in my mvc site with following route config: context.MapRoute( "adpan_clinics", "adpan/DoctorClinics/{doctorObj}/{controller}/{action}/{clinicObj}", new { action = "Index", Controller = "Clinics", clinicObj =…
Efe
  • 800
  • 10
  • 32
0
votes
1 answer

Add a global querystring paramter to T4MVC generated links

How can I add a hook to T4MVC so that when I get a link to an action using T4MVC it checks if the current request has a parameter, lets say PIN=1234. If it exists, i want this parameter to be added to the generated link.
Shrage Smilowitz
  • 24,494
  • 2
  • 28
  • 32
0
votes
1 answer

T4MVC unable to start transformation run creation process

When I try to run the template file, it doesn't do any new transformations other than replacing the T4MVC.cs file with ErrorDebuggingTemplate as its only contents and Visual Studio shows "Unable to start transformation run creation process" as the…
Sergey Smirnov
  • 303
  • 4
  • 11
0
votes
1 answer

How to force Visual Studio or T4MVC to use English locale instead of system-wide one?

The situation: Some members of our development team use Czech Windows, some (me including) use English OS. The problem is when we use T4MVC templates to generate some code automatically. The way it works is that the tool outputs the generated…
0
votes
1 answer

T4MVC for direct to ActionName in Post area it doesn't work

When i use T4MVC for direct to ActionName in Post Area , but it doesn't work when i see render html code
Mohammad Daliri
  • 1,370
  • 6
  • 20
  • 43
0
votes
1 answer

Using UrlHelper in Application_BeginRequest()

MVC 5 I have a need to call UrlHelper in Application_BeginRequest() to set some URL values elsewhere in the application. However when I call it as follows: var urlHelper = new UrlHelper(); urlHelper.Action(MVC.Bands.Index()) (I am using T4MVC so…
TheEdge
  • 9,291
  • 15
  • 67
  • 135
0
votes
0 answers

Get Error When Use T4MVC And RazorGenerator

When I use T4MVC And RazorGenerator I get these errors :
Soheil Alizadeh
  • 2,936
  • 11
  • 29
  • 56