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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect browser inside Web page viewer 1

Status
Not open for further replies.

Canelas

Programmer
Feb 20, 2008
46
PT
Hi all...
I'm not very sure if this is the place to post this question but here it goes...

I have a Sharepoint page with a page viewer web part. I can get to the page fine. The page works fine, as well as the page script wich is written in c#. The problem is, that when i want to redirect the browser window to another, it only redirects inside the webpart.
So, i need to redirect the page containing the web part, but i can only manage to redirect the page inside the web part. I'd like to do this inside the .cs file refering to the page.

Help... someone?
Thanks in advance.
 
See if window.parent or top will do the trick.

Phil H.
Some Bank
-----------
Time's fun when you're having flies.
 
window.parent works, but only in the aspx file. Although it is goog enough for my case, for reasons i don't understand, every buttons in the page, act with submit behavior, even when this is property is set to false.

Anyway... thanks.
 
Every buutons in the page were acting as they were submit buttons because they actually were. <asp:button> renders the <input type=submit> tag.

I managed to optimize the .cs code and now the page redirection is being done inside the codebehind page (.cs file).
I registered a javascript in c# code and that got the job done.
This is the code i added in C# to get this to work:

Page.ClientScript.RegisterStartupScript(this.GetType(), "Erro", "window.top.navigate(' true);

Thanks anyway.
 
Good job!

Phil H.
Some Bank
-----------
Time's fun when you're having flies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top