Search

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

Matching Posts

  • Re: Naming Conventions

    Yes - you could define a route for every single action where the name differs from the invocation url, but then you would lose the ability to use the more generic route placeholders like "{action}". If allowing the seperation between method names (and controller names) and invocation urls is technically difficult (or would have an impact on application performance), then I agree it's not worth it. If it's trivial to add, then I think it's a neat feature. I think most dev teams
    Posted to ASP.NET MVC (Forum) by Wargrip on 8/4/2008
  • Re: Naming Conventions

    +1 from me for allowing the action to be defined in a different way (on the Action method as an attribute for example). Something like this: [ActionName("tags")] public IList<Tag> SearchTags(string tag) { ... }
    Posted to ASP.NET MVC (Forum) by Wargrip on 8/1/2008
  • Re: SessionState required for tempdata in Preview 4

    Nevermind - solved it... if anyone else has this problem, they can use the following code: public class NullTempDataProvider : ITempDataProvider { #region ITempDataProvider Members public TempDataDictionary LoadTempData() { return new TempDataDictionary (); } public void SaveTempData( TempDataDictionary tempDataDictionary) { } #endregion } Then in the constructor of your controller: this .TempDataProvider = new NullTempDataProvider (); Hope this helps someone. Cheers Gavin
    Posted to ASP.NET MVC (Forum) by Wargrip on 7/17/2008
  • SessionState required for tempdata in Preview 4

    Hi, In our application we disable session state but with preview 4 there is an exception raised when loading a controller: The provider requires SessionState to be enabled. I know there is a ITempDataProvider interface now and I tried to add: this .TempDataProvider = null ; Into the constructor of my controller but it seems the temp data attempts to load before the controller is executed (according to the stack trace). Is there any way to disable the loading of the TempData so I don't have to
    Posted to ASP.NET MVC (Forum) by Wargrip on 7/17/2008
  • Maybe useful for some: PromoteRequestToRouteData attribute

    Hi, Thought I would post some code here that I am using. The need for it is as follows: I have an HtmlExtension for pagination that I use in many different views and controllers. Unfortunately, there is no way of knowing before hand where it will be used and therefore the paging links that are built need to by dynamic. The only standard that is enforced is that the controller action needs to accept a "pageNumber" parameter. A small part of the pagination code that generates the url is as
    Posted to ASP.NET MVC (Forum) by Wargrip on 7/11/2008
  • Re: Html.Textbox and the class html attribute

    You need to use an "@" sign when you refer to attributes that are reserved words. i.e. @class = "mycssclass"
    Posted to ASP.NET MVC (Forum) by Wargrip on 7/2/2008
  • Re: Creating an update form

    Hi, To answer your question about repopulating controls once you redirect back to the edit form, I have found the easiest way to do it is to store the captured form value in the ViewData or TempData(depending on whether you are using RedirectToAction or RenderView) and always set the value on the form. For example (on the edit form): <%= Html.TextBox("userName", ViewData.UserName) %> Then in the action that processes the form: MyViewData data = new MyViewData(); data.UserName = this
    Posted to ASP.NET MVC (Forum) by Wargrip on 5/15/2008
Page 1 of 1 (7 items)