Can a Post method take parameters from the Query String?
Can a Post method take parameters from the Query String?
YES is the answer (if you are in hurry to leave the site); and adding a keyword [FromUri] before model param in action method is the trick to do it. How It Works: If you have a model Foo: public class Foo { public string Bar { get; set; } public int Baz { get; set; } } And you want to bind this from the query string, then you must address the individual properties: ?Bar=qux&Baz=42 And annotate…
View On WordPress












