Hi Jason, Monorail doesn't currently support that, sorry! We are using ReflectionBasedDictionaryAdapter (which you can find in Castle.Core.dll) to convert the anonymous type to a dictionary, maybe you want to have a look at it and provide us an enhancement patch for it?
Cheers John ________________________________ From: Jason Meckley <[email protected]> To: Castle Project Users <[email protected]> Sent: Thu, 3 June, 2010 2:23:47 AM Subject: anonymous composite object MR 2.0 .Net 3.5 I am attempting to redirect to an action using an anonymous object. the problem is one of my parameters is a composite node. This var sort = new Sort{By="Name", Ascending = true}; RedirectToAction("Index", new {page, term, sort}); produces the url Index.castle?page=1&term=foo&sort=My.Namespace.Sort which makes sense to some degree. however I want it to build the url Index.castle?page=1&term=foo&sort.By=Name&sort.Ascending=true currently I am building my parameters from a hashtable var sort = new Sort{By="Name", Ascending=true}; var parameters = new Hashtable { {"page",page}, {"term",term}, {"sort.By",sort.By}, {"sort.Ascending",sort.Ascending}, }; RedirectToAction("Index", parameters); Is it possible to build a url from a anonymous, composite object? -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
