7
Answers

How do I check entered URL is valid or not

Areeb Quazi

Areeb Quazi

11y
15.6k
1
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)