We help IT Professionals succeed at work.

is it possible to link to a page of a different project in asp.net?

Palahniuk
Palahniuk asked
on
472 Views
Last Modified: 2012-08-13
Hello,
I would like to know if there is a way to use a hyperlink to navigate to page of different project inside the same solution in asp.net.

Comment
Watch Question

Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Hi Palahniuk, 
Yes. Click on Add Existing in your solution explorer. And from there when on the Add button there is a small arrow.. click on it. It will show you an option of Add as Link.
Regards,
Chinmay

If you have two different project under single solution configured as separate website in IIS then you can place a link to navigate to page in different project..
Robb HillSenior .Net Full Stack Developer
CERTIFIED EXPERT

Commented:
You can href to anything inside a solution or outside a solution....whether you do it the way as approached before....

The bottom line is you have to know what that link would be when deploying the project.  so if its another aspx page...then ofcourse you can href to it.

Author

Commented:
my structure is the following:

solution1
--->project1
----->page1.aspx
--->project2
------>page2.aspx
I want to place and <a href="..."></a>inside page1.aspx so i can link to page2.aspx
So far no luck! the resource cannot be found!
Sorry if I ask something too nubish but what relevant path should I insert???

Thanks!

Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Sorry for my earlier answer I think I should not answer when I am dead tired :)
Try this : <a href=".../project2/page2.aspx"></a>
Regards,
Chinmay

Author

Commented:
nope...no luck!
provided that its two dots instead of three to specify the previous directory...
the resource cannot be found!
any ideas of what can might go wrong?
Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
OOPS!!! there are two dots... only <a href="../project2/page2.aspx"></a>

Author

Commented:
like I said before it wont work...
are you sure? have you tested it yourself?
cause I just created the simple solution I described earlier and it wont work
Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Have you deployed these sites to IIS or you are using built in Cassini Server?
I think you are using Cassini server. If you deploy the sites to IIS server under a same website it will work.

Author

Commented:
Thanks I ll try this and let you know!
Top Expert 2013

Commented:
From my understanding that kind of linking in not possible.
Both your sites needs to be deployed on IIS.
something like this ...<a href="../project2/page2.aspx"></a> will try to find project2 folder inside project1.

So once you deploy both your project on say local iis you will be able to access like:

<a href="http://localhost/<virtualdirectoryProject2>/page2.aspx"></a>
from project1.
Senior .Net Full Stack Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
i think its correct but i found out that it wont do for me...
the deployed file structure is different so these relevant paths wont work...

I ll start another thread with that question!
Thanks

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.