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
1
vote
1 answer

Pass an object in RedirectToAction() using T4MVC

Possible Duplicate: pass data from Action To Another Action I have a view in which I submit a form and depending on the results I want to redirect to an action. The view that correspondes to and action is strongly-typed and it should accept a…
lopezbertoni
  • 3,551
  • 3
  • 37
  • 53
1
vote
1 answer

How T4MVC add-in and ASP.NET MVC integrate & work together?

I have an open source ASP.NET MVC application there is an add-in called T4MVC and I can see all the html, aspx, images, Controllers, views files are integrated, I wonder how it works. If I create a file(aspx,html...) has it to be integrated…
user998007
  • 131
  • 3
  • 15
1
vote
2 answers

T4MVC and Ajax method with parameter

I am trying to apply T4MVC to my project. Say, I have an ajax search box, it calls Home/SearchQuery action which takes in a string q as parameter. How do I write that line in T4MVC? From Ajax.BeginForm("SearchQuery", "Home", .... To…
Tom
  • 15,781
  • 14
  • 69
  • 111
1
vote
1 answer

T4MVC and just path without query parameters

Can I render a url without query parameters with T4MVC without using nullable ints? public virtual ActionResult GetSchoolsForDistrict(int districtId) { return Json(_schoolsService.GetSchoolsByDistrict(districtId.Value),…
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
0
votes
1 answer

T4MVC unit test generator

Is there in existence a TT file to generate unit tests for the generated output from t4mvc? If there isn't I may need to make one. Unless this is completely stupid? The co i work for are pretty much saying I need to get our generated code tested.
user156888
0
votes
1 answer

Can a T4MVC generated Form include a hash in the action?

I have a simple form where I would like to append a hash variable to the end of the action. My code looks like this: @using(Html.BeginForm(MVC.Checkout.Index(), FormMethod.Post)) { //Form stuff here } Which renders:
ilivewithian
  • 19,476
  • 19
  • 103
  • 165
0
votes
2 answers

Invalid ModelState with PartialViews

I have the following action [GET("Foo")] public virtual ActionResult Foo() { return View(new FooViewModel()); } the view for this action calls this partial view @{ Html.RenderAction(MVC.FooBar.AddFoo()); } with controller…
kenwarner
  • 28,650
  • 28
  • 130
  • 173
0
votes
1 answer

RemoteAttribute in viewmodel and ActionNameAttribute in corresponding action method (MVC3)

I just discovered that remote validation using the RemoteAttribute will not work unless either: The action method for the remote validation does not have an [ActionName] attribute, or The action method for the remote validation has an [ActionName]…
0
votes
0 answers

T4MVC showing list of files when stated as StaticFilesFolders in T4MVC .tt.settings.xm

Folks, I am currently having an issue with displaying sensitive files while entering url for this folders in T4MVC. Inside of the settings file I configured it to generate links for my other part of the application. However, I do not want to show it…
Hades
  • 1
  • 1
0
votes
1 answer

how to use t4mvc routing helper with custom route constraints

im using t4mvc in my current project and am trying to use the routing helper included however when i try to use custom constraints as below routes.MapRoute( "def_filtered_reports_route", …
Chris McGrath
  • 1,727
  • 3
  • 19
  • 45
0
votes
1 answer

T4MVC and performance issues

I have been using T4MVC for quite a while now. I have a high traffic site that keeps growing every year and we have noticed some performance issues. We are using LeanSentry and we are seeing these type of CPU spikes with our T4MVC URL generation. …
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
0
votes
1 answer

Is T4MVC compatible with Portable Actions?

T4MVC works nice with traditional ASP.NET MVC structure. But will it work with Portable Areas (feature from MvcContrib)?
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266
0
votes
1 answer

Using MVCt4 inside Javascript

I have recently become a T4MVC fanatic and now I seem incapable of using visual strings in my MVC3 projects. I am currently trying to use an T4MVC link to a script file inside a JavaScript function but it appears that I'm either doing it wrong or…
Vinney Kelly
  • 4,975
  • 1
  • 25
  • 31
0
votes
1 answer

How do I generate links in nested folders in T4 for ASP.NET MVC?

We are using T4MVC to generate for us links to our scripts and content. We've added a Script folders to some of our areas, and we want T4MVC to generate links for them as well. We've tried to modify it to add it as an line to T4MVC.tt.settings.t4,…
Łukasz W.
  • 9,538
  • 5
  • 38
  • 63
0
votes
1 answer

T4MVC causing incorrect URL's

Using T4MVC on my new MVC Razor Project and I will have an action link like so @Html.ActionLink(ViewRes.SharedStrings.HomeLink, MVC.Home.Views.Index, null, new { rel = "dropmenu7" }) so i would expect a url like…
Matt V
  • 1