editortemplates Questions

5

Solved

So, the title should speak for itself. To create re-usable components in ASP.NET MVC, we have 3 options (could be others i haven't mentioned): Partial View: @Html.Partial(Model.Foo, "SomePartial...

5

Solved

I have two editor templates: one for decimal, and one for decimal? (nullable) But when I have a nullable decimal in my model, it tries to load the normal decimal editor: <%: Html.EditorFor(mod...

3

Solved

I have a model similar to this: public class myModel { public ClassA ObjectA {get; set;} public ClassB ObjectB {get; set;} } In my main view, I have tags similar to this: <div id="section...
Apologetics asked 3/3, 2010 at 18:48

1

at the moment I have this: in the ViewModel: [MyCustom(Foo = 23)] public int CountryId { get; set; } in the Editor template: <%= Html.TextBox("", Model) %> how can I get the value (Foo...
Indulge asked 30/9, 2010 at 8:31

1

I have an editor template and within that editor template i want to call another editor template with the same model (i.e. nested), but it does not seem to display. ie. \EditorTemplates\Template1.c...

3

Solved

I have a standard set of templates for my mvc projects which I want to keep as an external folder in my source control (SVN) This means that I cannot put any project specific files in this folder ...
Folkestone asked 7/4, 2011 at 13:22

1

I would like to make custom editor templates for different data types in ASP.NET MVC (to use with Html.EditorFor()), including rewriting the existing templates. The ultimate goal is to create a min...
Freemason asked 31/3, 2011 at 8:36

4

I've just started a project using ASP.NET MVC 3. I'm building on top of an existing object system, so one of the first things I have to do is define display and editor templates for the various typ...

2

Solved

I have a viewmodel that includes a complex property of type TestThing which is declared as: public class TestThing { [Display(Name = "String3", Prompt = "String4")] public string Test1 { get; se...
Glyptography asked 17/3, 2011 at 9:5

1

Solved

I have an MVC 3 web app that uses Razor view engine. I would like to extend default editor templates so I'd like to add additional HTML5 attributes to input elements like autofocus. I'm using Addi...
Seanseana asked 3/2, 2012 at 22:21

3

Solved

I have what appears (to me anyway) to be a strange problem... I created a simple editor template for a SelectListItem (SelectListItem.cshtml in the ~/Views/Shared/EditorTemplates folder), for exam...
Azimuth asked 28/4, 2011 at 12:8

5

Solved

I want to create an editor template for DateTime, I need 3 separated fields: (DropDown) Day | (DropDown) Month | (DropDown) Year How and where do I create this file? And what do I need to do to ...
Harriette asked 14/7, 2011 at 12:28

1

Solved

I have two classes, Vat and Product. Product has a property of IVat. I am trying to use editor templates in MVC to display a dropdown list of all the Vat objects when creating/editing a Product. Fo...
Coz asked 12/6, 2011 at 19:22

1

Solved

new to mvc3, i have a few questions, would appreciate if someone could answer/provide links: When should I use View Models? Is it not recommended to use the domain? I find that my view models are...
Inspector asked 27/5, 2011 at 20:25

0

I'm looking for a faq or overview on C/C++ template-file variables in Netbeans (7.0). (Not to be confused with the template technique). Those you see under Tools > Templates > C++ templates. e.g. ...
Cleo asked 17/5, 2011 at 9:16

2

Solved

I am new to ASP.Net MVC 3, facing some issues while trying to implementing client side unobtrusive validation for a editor template I have created for showing date in a custom way. UI I need to sh...

1

In a custom editor template I want to access the parent object. I'm using this code but this is probably not the best way to do it, especially when using nested views: object parent = ViewContext...
Chiou asked 8/10, 2010 at 8:14

4

This code was converted from some ASP.Net MVC 2 code in this tutorial: MVC 2 Editor Template with DateTime It is a custom EditorTemplate for DateTime fields stored as 'EditorTemplates/DateTime.csh...
Babylonia asked 14/2, 2011 at 13:4

3

Solved

Every time I add a new App It creates a new AppCategory. I am seriously screwing this up somehow code first entity framework objects public class AppCategory { public int ID { get; set; } publ...
Chaldea asked 15/11, 2010 at 20:31

1

Solved

I have a controller with two simple Methods: UserController Methods: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Details(string id) { User user = UserRepo.UserByID(id); return View(user);...
Eady asked 29/4, 2010 at 12:57
1

© 2022 - 2024 — McMap. All rights reserved.