Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I'm trying to redirect from Gridview Link(HyperLink Field). When i give URL like http://Google.com or http://www.hclsd.com it redirects properly. When i try /JOBS/www.infosys.com giving error.
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.


Is it because the URL is not fully qualified?

Thank you in advance.
Posted
Comments
Ankur\m/ 19-Mar-14 6:32am    
What URL does it go to when you use /JOBS/www.infosys.com ?
Ajith K Gatty 19-Mar-14 6:35am    
This is my redirected url http://localhost:49829/www.infosys.com/careers.
Ankur\m/ 19-Mar-14 6:38am    
Clearly, that URL won't exist. And what URL do you want it to go?
Ajith K Gatty 19-Mar-14 6:42am    
/JOBS/www.infosys.com just try this in browser. It is redirecting. and all URL which starts with www is giving same error. So i tried prefixing http:// like http://www..... So i observed everything is working properly.
Ankur\m/ 19-Mar-14 6:45am    
It didn't redirect. But since my browser is configured to return Google search results for this, I got a search result from Google.

You seem to be confused about absolute and relative paths. There is a very nice article on CodeProject for the same. I suggest you go through it once - There is something about "Paths" for Asp.net beginners[^] and you will be able to solve your problem.
 
Share this answer
 
Comments
Ajith K Gatty 19-Mar-14 6:50am    
Yeah Yeah. I almost forgot about that concept. Thank You.
When you don't provide the http://[^] it search for local path from current directory and it will not open as a web url.
 
Share this answer
 
Comments
Ajith K Gatty 19-Mar-14 7:43am    
Yeah..Got it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900