Click here to Skip to main content
12,300,878 members (62,592 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
Hi all,

I am working with asp.net.
On page i am calling my onepage.aspx through iframe.
Here page is displayed properly but i am facing 2 problems.

1 Problem) Web page scroll.
Unnecessary lots of scroll comes on page. I don't want to fix Iframe scroll and height. I want web page height.
I had tried setting table,iframe, through css, body >> height=100% but this does not seems to work.

2 Problem) Iframe source setting through code behind.
On page load adding source attribute like
Iframe.Attribute.Add("src", URL)
Here, whenever i am loading page ' instead of iframe to reload ', it is generated inside 'one another'.
I have already set iframe attributes inside page .ispostback.

Can anyone suggest me on this
Posted 23-Feb-12 0:42am
Edited 23-Feb-12 0:54am
v3
Comments
ryanb31 23-Feb-12 7:54am
   
I am not sure what your exact question is but it sounds like you need help getting rid of scrollbars. The best thing to do is use the developer tools in whatever browser you are using to track down what is causing it.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

overflow css hides scrollbars

Add style to iframe tag

<iframe style="overflow-x: hidden; overflow-y:hidden;"></iframe>
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Problem was with
Response.Redirect("Page.aspx")
Whenever response was getting called iframe was generated within one another.

Solution: Instead of response.redirect added below code and it worked awesome.
Page.ClientScript.RegisterStartupScript(Me.GetType(), "scriptid", "window.parent.location.href='../Page.aspx?Pdata=123'", True)
  Permalink  
Comments
JeremyKyle 29-Feb-12 12:00pm
   
Completely unfindable from your badly worded q

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 24 Feb 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100