Areeb Quazi

Areeb Quazi

  • NA
  • 109
  • 0

How do I check entered URL is valid or not

Sep 20 2013 2:19 AM
Hi,

I have requirement to validate URL i.e. If user put invalid URL then application should show generic error page.

For ex: when user enter URL in browser like ie8

correct URl is: www.abc.com/hr/test.aspx (then test page should display)

if user puts: www.abc.com/hr/xyz (with extension or without extension) then application should redirect to generic error page.

I am using asp.net 4.0 and my application have multiple folders like admin/user etc and each folder have multiple web pages.
Please suggest how can I achieve this functionality.

Thanks

Answers (7)