iframe高度和环形 [英] Iframe height & loop

查看:99
本文介绍了iframe高度和环形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用asp.net.
在页面上,我通过iframe调用我的onepage.aspx.
这里的页面显示正确,但是我面临2个问题.

1问题)网页滚动.
页面上出现不必要的滚动.我不想修复iframe滚动和高度.我想要网页高度.
我曾尝试通过css,body>>设置表格iframe.高度= 100%,但这似乎不起作用.

2问题)通过后面的代码对iframe进行源设置.
在页面加载中添加源属性,例如

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)


在这里,每当我加载页面''而不是iframe重新加载''时,它就会在``另一个''内部生成. 我已经在.ispostback页内设置了iframe属性.

谁能在这个


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

推荐答案

溢出CSS掩盖滚动条
上建议我
为iframe广告代码添加样式

overflow css hides scrollbars

Add style to iframe tag


问题出在
Response.Redirect("Page.aspx")


每当响应被调用时,iframe就会相互生成.

解决方案:代替response.redirect在下面的代码中添加了代码,效果很棒.


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)


这篇关于iframe高度和环形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆