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

Generate a URL inside Application_Start()

ASP.NET MVC 5 T4MVC (https://github.com/T4MVC/T4MVC) ABP (http://aspnetboilerplate.com/) I know it is possible to use T4MVC to generate a URL based on a specific action using UrlHelper(). See SO and here. However I ultimately need to do this…
TheEdge
  • 9,291
  • 15
  • 67
  • 135
0
votes
1 answer

T4MVC problems with MVC 2 under VS2010: cannot convert from 'method group' to 'System.Web.Mvc.ActionResult'

Just added the T4MVC templates to my project, built and then tried to use the cool new features it introduces. I tried to update RedirectToAction("NotFound", "Error"); to RedirectToAction(MVC.Error.NotFound); I get the following error at…
Chaddeus
  • 13,134
  • 29
  • 104
  • 162
0
votes
1 answer

does not generate async method in T4MVC

I used T4MVC version 3.16.0 and I have method like this : public async virtual Task Read([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel) { //call async method here } I run T4MVC.tt but when I call that…
Uthman Rahimi
  • 708
  • 5
  • 22
0
votes
1 answer

No intellisense in javascript (*.js) file when using T4MvcJs

I have started using T4MvcJs in my project recently. The problem I am facing is that, I am unable to use Intellisense feature in my javascript file (.js) when using T4MvcJs (generated strongly-typed) URLs, and I have to type precisely all strongly…
Asad
  • 1
  • 1
0
votes
1 answer

Using T4MVC when Controllers and Views are in different Libraries

Is it possible to use T4MVC when The Controllers and Models are in a different Library to the Views? For example, Namespace.Common.MVC which contains the Controllers and Models, which is referenced …
NikolaiDante
  • 18,469
  • 14
  • 77
  • 117
0
votes
1 answer

T4MVC Bug In generated code (Identifier expected)

I have just installed T4MVC in a new project and I am having the following error: (I have used T4MVC in previous projects and never had this issue) CS1001: Identifier expected The error come from this generated code (in file…
sabotero
  • 4,265
  • 3
  • 28
  • 43
0
votes
1 answer

Is it possible to use T4MVC and Asynchronous operations?

My Action: public virtual async Task IdeaDetails(int id) { My routes: routes.MapRoute("DesignIdeasDetails", "ideadetails/{id}", MVC.Designer.IdeaDetails().AddRouteValue("id", UrlParameter.Optional) Error:…
Alex Gurskiy
  • 263
  • 1
  • 5
  • 14
0
votes
1 answer

Properly use bootstrap switch which call c# function (T4MVC/Entity Framework)

I can't find words to explain without code, so here's what I got so far: View: (bootstrap switch) [...] @foreach (var item in Model) {
0
votes
1 answer

T4MVC and DisplayModeProvider issue with fully qulified views

I have code that detects the user agent and creates a new display mode (ie. "tablet" and "mobile") DisplayModeProvider.Instance.Modes.Insert(1, new DefaultDisplayMode("mobile") { ContextCondition = (context =>…
KanTube
  • 61
  • 1
  • 3
0
votes
1 answer

T4MVC support for TypeScript

In my ASP.NET MVC (5) application I am using T4MVC to prevent magic strings appear in my views. However it is common that I need an Url in my JavaScript or TypeScript code especially when doing AJAX requests. Currently I am using Razor code in my…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
0
votes
0 answers

T4MVC - Folder under views in areas, can't create view property in Controller Views

I have a MVC Project that has T4MVC and I'm using Areas, under the Views in Areas, I'm using another folder to organize the views by feature. Because of this T4MVC can't identify the views for the specific controller. How do i solve this? Here's a…
DevEstacion
  • 1,947
  • 1
  • 14
  • 28
0
votes
0 answers

accessing virtual actionresult in mvc

I want to know how can I access virtual actionresult, since I haven't seen so far this type of actionresults. I've read little bit and I can see that is related to t4mvc but I'm not sure how can I access it. This is what I have, ScheduleController,…
Laziale
  • 7,965
  • 46
  • 146
  • 262
0
votes
1 answer

AsyncController in MVC2 and T4MVC: can they work together?

Async actions in AsyncControllers (in MVC2) have two action methods (ActionNameAsync and ActionNameCompleted) which seem to confuse T4MVC. If it can't be done with T4MVC, is there a way to disable it from trying to include these methods?
Robert Dean
  • 3,193
  • 3
  • 25
  • 29
0
votes
1 answer

T4MVC Url.Action(MVC.Area.Controller.Action()) returns null

I'm trying get URL using Url.Action() and T4MVC. But this method returns null: Url.Action(result:MVC.Data.Persons.Search()) how can I solve this problem?
ahmadali shafiee
  • 4,350
  • 12
  • 56
  • 91
0
votes
1 answer

Can T4MVC be configured to find methods defined in another assembly?

I'm examining a scenario in which I'd be using RazorGenerator to share my MVC views between two different MVC sites, and I was wondering if it would be possible to also put partial implementations of a controller in another assembly and have T4MVC…
DLeh
  • 23,806
  • 16
  • 84
  • 128