Home > Exploring the CodeFluent Runtime > Exploring the CodeFluent Runtime: EditableUri

Exploring the CodeFluent Runtime: EditableUri


A little known yet handy class when developing ASP.NET web sites is the EditableUri class provided in the web runtime (CodeFluent.Runtime.Web.dll) which allows developers to build and manipulate URIs.

Using this class you can easily get or set the scheme of an url, its port, or its parameters:

EditableUri uri = new EditableUri("http://www.softfluent.com");
uri.Parameters.Set("foo", 1);
uri.Parameters.Set("bar", 2);
Debug.WriteLine(uri.ToString());

// Output: http://www.softfluent.com/?foo=1&bar=2

Keep it in a corner, it might come in handy one day Winking smile

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 41 other followers