Search

You searched for the word(s): userid:791606

Matching Posts

  • Unexpected consequences in new routing behavior

    In migrating to Preview 3 I decided to opt not to nest views under the "/Views/" folder for various reasons. This presents a problem with routing default actions when RouteExistingFiles is on (and I like it on). For example, "account/{action}" with a default action of "ViewAccount" doesn't work because Routing sees that "account" is an actual folder and passes over it, denying me a directory listing instead of calling the action. I believe simply excepting
    Posted to ASP.NET MVC (Forum) by DanFinch on 6/11/2008
  • Re: State in the context of the request

    Same reason I don't use the registry :) It's not related to ViewData - as a mechanism the dictionary would probably work but using it for this would be a stretch. ViewData is passed into the view from the controller, but I want to pass data from the views to a control or combination of helpers. For example, suppose Site.Master, Index.aspx, and ProductView.ascx all had calls to helpers declaring that they each require several javascript files to work. The bottom of Site.Master also contains
    Posted to ASP.NET MVC (Forum) by DanFinch on 5/28/2008
  • State in the context of the request

    I'm wondering how best to do this in MVC: I'd like to include styles and scripts in various views (aspx, ascx, and master) through a helper or control in order to apply some minification and caching behavior in production (simple includes must be rendered for debugging). In WebForms I accomplished this with a UserControl that stored the references in Page.Items in an early lifecycle event then hooked a later event to apply the logic. This worked great, however, Page.Items simply won't
    Posted to ASP.NET MVC (Forum) by DanFinch on 5/27/2008
  • Re: What about TagLibs like controls

    Server controls still work in MVC (implement a custom Control or WebControl), but I'm pretty sure you must call whatever event(s) you need manually (Render() seems most appropriate). Use the PersistenceMode, PersistChildren, and ParseChildren attributes to configure how the control and its properties work - you can do all sorts of things along the lines of what you want.
    Posted to ASP.NET MVC (Forum) by DanFinch on 5/27/2008
  • Re: Rich Text Editor for MVC?

    Getting TinyMCE to work with MVC was a snap for me, and it's modular so it's only as bloated as you want to make it :)
    Posted to ASP.NET MVC (Forum) by DanFinch on 5/25/2008
  • Re: Run code before RenderView()

    http://weblogs.asp.net/fredriknormen/archive/2008/03/12/asp-net-mvc-framework-2-interception-and-creating-a-role-action-filter.aspx ActionFilters are perfect for this. You get to play around before an action is called, and after it's called. You can override these methods in each Controller, too. You can also make a custom controller base class, or a combination of these methods.
    Posted to ASP.NET MVC (Forum) by DanFinch on 4/9/2008
  • Re: Where do I put my SQL / Linq?

    If it's a service specific to your application, the convention is to plop in the "Services" folder in the project, but if it's a reusable component in its own right (examples: a Flickr client, a logging library) it belongs in its own assembly, really.
    Posted to ASP.NET MVC (Forum) by DanFinch on 4/7/2008
  • Re: Where do I put my SQL / Linq?

    My understanding is that essentially: helpers help views, services help controllers. Services are typically components decoupled from MVC and may contain business logic, data access, etc. Because your controller is the client of these service(s), it's natural that it would contain some code, including LINQ queries to sort or organize data intended for views. I should add - I'm talking about LINQ itself: unless your business logic is pretty simple I believe the best way is to write your LINQ
    Posted to ASP.NET MVC (Forum) by DanFinch on 4/7/2008
  • Re: Code Blocks vs. Code Behind

    When I first took a look at ASP.NET MVC I was wary of the inclusion of .aspx but after working with it for a while I'm beginning to favor spaghetti code in MVC. In web forms it quickly got hairy and there's every opportunity to avoid unreadable nonsense entirely in MVC (helpers), but it's a great templating solution for people who want to work intimately with the standards, but I've found use for view-specific helper methods in code-behind which use System.Web.UI.HtmlControls. It
    Posted to ASP.NET MVC (Forum) by DanFinch on 3/28/2008
  • Re: Thoughts inspired by ASP.NET MVC Programming model

    I think ASP.NET MVC strengthens AJAX development. ASP.NET MVC facilitates a RESTful (or at least RESTish) approach to writing your application, great for integration of all clients, including browsers. Typically your site will be a collection of pages and the interactive AJAX applications will reside on specific pages, so I don't see that as being an obstacle. An entire site in one primary request typically is not what most sites will look like (and there are good buzzwords reasons for this
    Posted to ASP.NET MVC (Forum) by DanFinch on 3/21/2008
Page 1 of 2 (11 items) 1 2 Next >