Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How do I navigate to another URL from a WebPart

  Asked By: Taylor    Date: Apr 17    Category: Sharepoint    Views: 1987

I already have an existing ASP application working on an IIS 6.0
server. I would like my WebPart to navigate to the asp page that I
currently have working. For the example below I'm using "cnn.com" as
the URL that I would like to go to. The RenderWebPart method below
gets an error when the SharePoint site is refreshed.

this.Context.Server.Transfer("http://www.cnn.com" target="_blank" rel="nofollow">http://www.cnn.com");

I also tried using the Redirect method from the response object. This
code actually worked but the entire browser was redirected to CNN
instead of into the WebPart. This code is below.

this.Context.Response.Redirect("http://www.cnn.com" target="_blank" rel="nofollow">http://www.cnn.com");

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Mason Salazar     Answered On: Apr 17

Are you doing something beyond what is already there in the OOTB site  viewer
and/or web clipper web parts?

 
Answer #2    Answered By: Jesus Davis     Answered On: Apr 17

I'm not familiar with either of these components. However, I will
eventually need to generate the URL dynamically based on user
information. I also need to build a package of WebParts so I will
need to provide the navigation ability along with other functionality.

 
Didn't find what you were looking for? Find more on How do I navigate to another URL from a WebPart Or get search suggestion and latest updates.




Tagged: