For example on my site i got links to twitter,facebook etc.
and the link to the facebook is wrong, so when click the facebook link on my asp.net mvc page.
HTTP 404 will be thrown by the browser, so how can this be handled as this wont be caught by Application_Error in the global ascx page.
One way i could think of is tht clicking the link should call a action method
where it would ping the url and check if the link is working if works,thn it would redirect.
Is there any other way do this?
Periodically validate all your links using a tool like this one. I don’t think it really makes sense to do this on demand when the user clicks on the link.