define a web request for the specified URL
<p>what is the best way to validate a valid url and through error message?</p>

<p>i am using something like this:</p>

<pre><code> HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
</code></pre>

<p>i am doing try and catch to catch the error message</p>

<p>is that enough or can be do better then that?</p>
