如果用脚本来动态控件iframe的width和height? <iframe id="iframe1" runat="server"></iframe>后台代码:protected HtmlContainerControl iframe1;iframe1.Attributes["width"] = width;iframe1.Attributes["height"] = height; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 以下代码经过测试<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="gb2312" lang="gb2312"><head><title> New Document </title><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><meta name="title" content="" /><meta name="author" content="活靶子,Huobazi,www.AspxBoy.com" /><meta name="subject" content="" /><meta name="language" content="gb2312" /><meta name="keywords" content="" /><meta name="Copyright" content="www.AspxBoy.com" /><meta name="robots" content="all" /><script>function aaa(size){ document.all.frm.width=size;}</script></head><body><table border="0"><tr><td><input type=button onclick="aaa(500)" value="width500px"><br /><input type=button onclick="aaa(200)" value="width200px"></td></tr><tr><td><iframe id="frm" name="frm" src=http://www.aspxboy.com /></td></tr><table></body></html> 不行啊。刚试的。说实例不存在。下面是代码片断:在绑定.cs中: protected HtmlContainerControl ifFirstPage; ifFirstPage.Attributes["width"] = "100"; ifFirstPage.Attributes["height"] = "100";在.aspx中:<myNS:PageView><iframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1"></iframe></myNS:PageView> tryiframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1"></iframe>----->protectedHtmlGenericControl ifFirstPageiframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1" runat=server></iframe> 我把一个TextBox的Visble属性设为False之后为什么拿不到值了? 回复问题 (在线等啊,希望大家帮帮忙,很急的)火狐 表格合并单元格的问题 seleect 语句字段转换! 有谁用过XIGLA公司的AbsoluteLiveSupport吗? 大型网站如何保管用户的密码是SESSION还是COOKIE? 数据集里数据表列求和怎么做? Something about "Session" dataview问题????? 哪有订单录入的例子,(asp.net+c#),谢谢了 请教关于ado.net问题 简单的DataList问题?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="gb2312" lang="gb2312">
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="title" content="" />
<meta name="author" content="活靶子,Huobazi,www.AspxBoy.com" />
<meta name="subject" content="" />
<meta name="language" content="gb2312" />
<meta name="keywords" content="" />
<meta name="Copyright" content="www.AspxBoy.com" />
<meta name="robots" content="all" />
<script>
function aaa(size)
{
document.all.frm.width=size;
}</script>
</head>
<body>
<table border="0"><tr>
<td>
<input type=button onclick="aaa(500)" value="width500px">
<br />
<input type=button onclick="aaa(200)" value="width200px">
</td>
</tr>
<tr>
<td>
<iframe id="frm" name="frm" src=http://www.aspxboy.com />
</td>
</tr>
<table>
</body>
</html>
在绑定.cs中:
protected HtmlContainerControl ifFirstPage;
ifFirstPage.Attributes["width"] = "100";
ifFirstPage.Attributes["height"] = "100";
在.aspx中:<myNS:PageView>
<iframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1"></iframe>
</myNS:PageView>
iframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1"></iframe>
----->
protectedHtmlGenericControl ifFirstPage
iframe id="ifFirstPage" src="/WebPlan/Source/FirstPage.aspx" width="100%" height="100%" scrolling="yes" frameborder="1" runat=server></iframe>