Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Iframe Module [...  Response.Redirect to new (parent) page...
Previous Previous
 
Next Next
New Post 8/21/2008 4:06 AM
User is offline Yuri Saveliev
8 posts
10th Ranked


Response.Redirect to new (parent) page... 

I am displaying an my .aspx page inside of an IFrame module.

In postback after some verification I want to redirect to other dnn page:

Response.Redirect("/Registration/tabid/65/Default.aspx").

But this new page open inside IFrame window, not on current dnn page that contain IFrame.

And I cannot to set target for this redirect.

What can I do?

 
New Post 8/21/2008 7:59 AM
User is offline Vitaly Kozadayev
753 posts
www.continure.com
7th Ranked






Re: Response.Redirect to new (parent) page...Y 
Modified By Vitaly Kozadayev  on 8/21/2008 10:37:01 AM)

That is a common issue people have working with IFrames. You'll have to utilize Javascript to fix it.

In  your aspx page, instead of redirecting, add a javascript statement (you can inject it from code, or just add it to a literal control, or make it invisible initially)

The statement should be like so:

if (parent.document) { parent.document.location.href='http://yahoo.com'; }

This way, once your page come back, it'll force the redirect on it parent - the DNN page that contains an IFrame.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post 9/21/2008 3:56 AM
User is offline Yuri Saveliev
8 posts
10th Ranked


Re: Response.Redirect to new (parent) page...Y 

can you give me a sample code?
i tryed with literal control and don't
succeeded...

i need to make anything in postback on server side (redirect)?

 
New Post 9/21/2008 6:07 AM
User is offline Vitaly Kozadayev
753 posts
www.continure.com
7th Ranked






Re: Response.Redirect to new (parent) page...Y 

                 if (!Page.IsStartupScriptRegistered("redir"))

                    Page.RegisterStartupScript(this.GetType(), "redir",
                        @"<script type=""text/javascript"">if (parent.document) { parent.document.location.href='http://yahoo.com'; } else { document.location.href='http://yahoo.com'; }</script>");
 

Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post 9/22/2008 1:16 AM
User is offline Yuri Saveliev
8 posts
10th Ranked


Re: Response.Redirect to new (parent) page...Y 

I receive error on code "if (parent.document)":

Error: Access is denied.
 

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Iframe Module [...  Response.Redirect to new (parent) page...
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DeutschNetNuke = DotNetNuke in German
DeutschNetNuke provides all DotNetNuke related services in German (and English).
www.DeutschNetNuke.de
The Standard in Senior Housing Information
SNAPforSeniors provides consumers with free online resources to assist them with their search for senior housing
www.snapforseniors.com
DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP