Hi,
I tried some code it works perfect If there is url it shows results otherwise
shows msgs.
WebRequest req = WebRequest.Create("http://www.codeproject.com");
WebResponse res;
try
{
res = req.GetResponse();
}
catch (Exception ed)
{
goto sd;
}
Stream sg = res.GetResponseStream();
StreamReader sr = new StreamReader(sg);
resdiv.InnerHtml = sr.ReadToEnd();
goto fg;
sd:
resdiv.InnerHtml = "Sorry no such url exists ";
;
fg:;
The meaning of above code is if url has exists there is no exeception if it not exists it'll raise webnull Execption.
We handle that execption in that we write what we've to do if url not exists.
I hope you'll understand what i said.
All the best