Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:46472
More Search Options
RSS Available
Matching Posts
Re: TryUpdateModel gives System.MissingMethodException: No parameterless constructor defined for this object.
In some places I could see that, but in most of those situations those properties aren't public anyway. I generally don't make a domain object's property public unless i'm already going to allow it to be set from the UI. But that makes me wonder, what if you have a public get, but a private or protected set? Would UpdateModel() set that anyhow? Craig
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/11/2008
Re: TryUpdateModel gives System.MissingMethodException: No parameterless constructor defined for this object.
Cool thanks. THat was my suspicion, because when I removed a property to another class that had lots of deep references to other objects, then the problem went away. When I put that property back, the error resurfaced. I can just explicitly state my properties for now and its happy. Glad you guys are on top of it and I'm really pleased w/ MVC so far. It is probably one of the biggest improvements to ASP since .NET.
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/11/2008
Re: TryUpdateModel gives System.MissingMethodException: No parameterless constructor defined for this object.
Well, I changed my code to do this: this.UpdateModel(purchase, "purchase", new[]{ "Comments", "TypeOfPayment", "PurchaseTime" }); and explictly stated my properties to update, and all was well, but i suspect this is a bug in asp.net MVC. I think somewhere in my hiearchy of objects I had a reference to an object that did not have a parameterless constructor, so thats why it failed. Please fix this if you can replicate it somehow!
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/10/2008
Re: TryUpdateModel gives System.MissingMethodException: No parameterless constructor defined for this object.
The odd thing is, this only happens during Unit Testing, not when running the page. I'm using structure map and NUnit to do my testing and DI.
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/10/2008
TryUpdateModel gives System.MissingMethodException: No parameterless constructor defined for this object.
I keep getting this error with this code in my controller: var purchase = new PurchaseInquiry(profile, product); this.TryUpdateModel(purchase, "purchase"); Why does MVC need a parameterless constructor on my object when I'm doing the constructor for it? I dislike having the presentation layer dicate how my domain objects look. craig
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/10/2008
Re: Are we going to see MVC controls?
You know I thought lack of controls would be a show stopper, but its really not. The extra abstraction layer that webforms provided also created a lot of problems (viewstate, styling, javascript integration because of renamed ID attributes, lifecycle issues, etc) So instead of using any server controls we've adopted JQuery.UI as our control replacement. For basic stuff like textboxes and things we use Html helpers but for the really heavy UI stuff, we use something that is designed for it. Keeping
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/10/2008
Logic (not presentation) shared between controllers
I am in a situation where I need to reuse some logic in one controller in another. The views/presentation is different. Basically, I have two different ways of registering. The user can click at the top of the page on a "register" link and fill out the normal info: name, email, address, password, etc. Or, they can register as they are requesting more information about a product. They see the information about the product, as well as the normal registration fields above and a few new fields
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 12/2/2008
Re: RenderAction
that doesn't see all that different from what we're doing, except that by having the call to the other controller as an attribute, you wouldn't be able to decide whether to call it or not at runtime. But seems like this could be done similarily thru C# code. Something like: public ActionResult Foo() { var results = InnerController.Bar(); this.ViewData["barResults"] = results.Html; } <% Html.RenderSubView( this.ViewData["BarResults"] ) %>
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 10/10/2008
RenderAction
This is probably more of a discussion then a simple question, but i'm curious why some people are against putting "Html.RenderAction()" to reuse controller methods? I guess because the view is calling the controller? What would be an alternative to this to still allow controller methods and their views to be reused (like controls) ? Thanks, Craig
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 10/10/2008
Partial page caching
I'm using preview 5 and trying to get some partial page caching. I don't want to use a user control. I am instead using RenderAction() to render one of my controllers. Then I'm putting [OutputCache(Duration=1200)] on my controller method, but its still firing every time and not caching when called in this way. Is this not supported yet? Is there another way i should be doing this? Thanks, Craig
Posted to
ASP.NET MVC
(Forum)
by
fregas
on 10/10/2008
Page 1 of 10 (96 items) 1
2
3
4
5
Next >
...
Last »
ASP.NET:
Live Preview jQuery Plugin
TechNet Edge:
UAG reaches RTM
Channel 9:
Who, What, When, Where, Why and How of MIX10
Channel 10:
Berlin Wall in Silverlight
TechNet Edge:
System Center Operations Manager 2007 R2 – Service Level Dashboard part 2, Installation
Silverlight:
Contributing to the SL HVP
Silverlight:
Best SF Books of All Time
Channel 9:
Reactive Extensions API in depth: Repeat
Channel 9:
Jeffrey Van Gogh: Testing Rx with Pex
Channel 9:
The Visual Studio Documentary: Dan Fernandez Full Length Interview
ASP.NET:
Search Engine Optimization (SEO) Toolkit
Channel 10:
This Is Your Data on Silverlight
ASP.NET:
How the IIS SEO Toolkit Saved My Butt
TechNet Edge:
Windows 7 XP Mode User Experience
ASP.NET:
Using WCF RIA Services without Silverlight in Visual Studio 2010 for building 3 tier ASP.NET Applications
Channel 9:
Ping 41: Top stories of 2009, bing, windows 7, laptop hunters, azure
Channel 9:
endpoint.tv - Windows Server AppFabric in action monitoring and troubleshooting
Channel 10:
Windows Marketplace for Mobile Opens to 6.0, 6.1 Phones
Channel 9:
Rx API in depth: Hot and Cold observables
ASP.NET:
Back in Business
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online