Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call project 2 aspx from project 1 aspx code-behind

Status
Not open for further replies.

markgrizzle

Programmer
Aug 3, 2003
288
US
Hi All,
My project_1 folder contains all the asp.net/vb.net pages for my website. I created a project_2 folder for a new c# login page. I did this because I needed to add OpenID support (dotNetOpenAuth), couldn't find any vb.net samples, and wasn't up to the task of porting the c# code to vb.net.

Project_2.login.aspx works, but I can't response.redirect("search.aspx") to any project_1 pages; visual studio 2010 returns a 404 error. Both projects are in the same solution, and the solution compiles. My target framework is ASP.NET 3.5. I've tried the following;

1) add project_1 page links to project 2 (won't compile)
2) copy project_1 pages to project_2 (won't compile)
2) add references for project 1 to project 2 (compiles, returns 404 error)
3) server.transfer("search.aspx")
4) response.redirect("../folder1/search.aspx") (httpException - can't use a leading .. to exit above top directory, but my folders are at the same level)
5) response.redirect(server.transfer("search.aspx"))

Has anyone solved this, or (ideally) seen vb.net samples of OpenID implementations?

Thanks in advance,
Mark
 
this is working harder, not smarter (if it's even possible). out of the box each site is treated as a different website, not as 2 projects under one site. and trying to get webforms to do anything outside of the box is near impossible.

your time will be better spent converting the code sample from one language to the other. there are even online translators that can convert code back and forth.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Hi Jason,
Thanks for responding. I agree with you, and in the long-term, I'll make the switch to C#, and rebuild the vb.net pages.

I've made some progress since my post. I removed the vb.net project from the solution, rearranged the folders (solution/project_2/project_1), then re-added the project to the solution; everything compiles now, so this just might work.

Regards,
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top