<%
departId = Session("role")
if departId = "4" then
%>
<iframe name="leftframe" width="100%" Height="100%" marginwidth="0" marginheight="768" frameborder="0"
src="leftframe1.htm"></iframe>
<%
else 
   %>
<iframe name="leftframe" width="100%" Height="100%" marginwidth="0" marginheight="768" frameborder="0"
src="leftframe.htm"></iframe>
<%
end if
%>

解决方案 »

  1.   

    用c#
    <%
    string departId;
    departId = Convert.ToString(Session["role"]);
    if(departId=="4")
    {
    %>
    <iframe name="leftframe" width="100%" Height="100%" marginwidth="0" marginheight="768" frameborder="0"
    src="leftframe1.htm"></iframe>
    <%}else{%>
    <iframe name="leftframe" width="100%" Height="100%" marginwidth="0" marginheight="768" frameborder="0"
    src="leftframe.htm"></iframe>
    <%}%>
    试一下吧
      

  2.   

    你这就是要在不同的条件下显示不同的页面吧,你可以简单这样:
    <iframe name="leftframe" width="100%" Height="100%" marginwidth="0" marginheight="768" frameborder="0" src="<%=myhtmlurl%>"></iframe>然后,在后台定义一个变量 
    public string myhtmlurl;
    然后给这个变量赋值
    if()
    {
    myhtmlurl = "leftframe.htm";
    }
    else
    {
    myhtmlurl = "leftframe1.htm";
    }这样就可以了.
      

  3.   

    我是用table的disbialed来实现页面内容差异加载的
      

  4.   

    hchxxzx,你的方法在调试的时候行,但是一上线就不行了啊