Form handling

The form system can decode any type of form (as long as you write a handler =)).

The following web form
<input type="text" name="user[username]" />
<input type="text" name="user[password]" />


are the same as:
<user>
  <username>jonas</username>
  <password>mypass</password>
</user>


and:
<user username="jonas" password="mypass">


or a query string: http://myhost/user[username]=jonas&user[password]=mypw


They are handled as:
  Console.WriteLine(Request.Form["user"]["username"]);
  Console.WriteLine(Request.Form["user"]["password"]);


Any new decoder should implement the FormDecoder interface and can then be added by using
  webserver.FormDecoderProviders.Add(new YourDecoder());

Last edited May 7, 2008 at 3:32 PM by jgauffin, version 2

Comments

No comments yet.