后台如何动态改变框架的SRC?
我新建一个aspx,并在html里加入以下代码(框架)
<frameset framespacing= "1 " rows= "*,24 ">
<frameset cols= "100,79%,0 " id= "forM ">
<frame name= "left " target= "main " src= "menu.htm " scrolling= "no " noresize >
<frame name= "main " src= 'DefaultContent.htm ' target= "_self ">
<frame name= "right " id= "right " target= "main " style= "display:none; " src= "Help.htm " noresize>
</frameset>
<frame name= "bottom " scrolling= "no " noresize target= "contents " src= "task.aspx ">
<noframes>
<body>
<p> 此网页使用了框架,但您的浏览器不支持框架。 </p>
</body>
</noframes>
</frameset>
现在我想在后台根据权限Session[ "Role "]的值判断去动态地改变左桢的src,请问如何改呀?即下面这句
<frame name= "left " target= "main " src= "menu.htm " scrolling= "no " noresize >
顺便,我是一个初学的菜鸟,所以希望CSDN友回复可以写出详细点的参考代码.谢谢了
------解决方案--------------------左桢 放一个中转的.aspx页面,在这个页面里判断Session ,然后转向。
------解决方案-------------------- <frame name= "left " target= "main " src= " <%=src%> " scrolling= "no " noresize >
后台
string src = "xx.aspx ";
------解决方案--------------------。。汗死,string 要全局的,
写在方法外面, public string src;