Rails Params object vs HttpRequestBase Request object

Last post 03-12-2008 9:21 PM by nagir. 1 replies.

Sort Posts:

  • Rails Params object vs HttpRequestBase Request object

    03-12-2008, 1:41 AM

    Maybe I've missed this somewhere,, but going over tutorials and just playing around with the 2nd ctp, I haven't come across an explanation of where a dictionary/array of values are, similar to rails params[].  this.Request[string key] returns only a string.  this.Request.Form returns a string of the form values. 


    Html standards allows for arrays in names of inputs so that you can have an input like <input name="[User]FirstName" value="" />, so it would be awesome to have something that would be like this.Params["User"] which would return an IDictionary<string, object> as an object.  I have a base class for linq objects that would allow for something like

     user.Merge((IDictionary<string, object>)this.Params["User"]); and others might do this as well since asp.net mvc takes more of a free form approach the resembles rails. 

    or at least point me to the direction of handling more complex objects using a form in the view for something like Membership & User providers in a single form.  Having to break this up into a smaller form when only one should do, would be more hackish. 

     

          
     

  • Re: Rails Params object vs HttpRequestBase Request object

    03-12-2008, 9:21 PM
    • Member
      160 point Member
    • nagir
    • Member since 01-09-2006, 7:01 PM
    • Australia
    • Posts 178

    Try to search for UpdateFrom

Page 1 of 1 (2 items)