<%
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
%>
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
%>
解决方案 »
- 急求!!!!
- Updatepanel 中有td的刷新问题,急,在线等。
- 把锅砸喽,把铁卖喽,求解正则表达式难题.......在线等,火急!
- 做一个DataGrid控件,是否可以在控件中加上一个DropDownList
- 急!!!!网站部署到本地IIS上 ajax 失效了怎么办
- 急急急!!一道asp.net试题
- msdn上有没有关于Microsoft.Word的SDK?
- 简体、繁体、英文三个版本共存的问题
- DataGrid可不可以实现这样的显示??在线等
- 请问如何在DataGrid中假如CheckBox控件?
- 为什么我在后台编码 DongTai.aspx.cs文件中实例化不了己写好的类呢?
- 怎么把oracle的number(无小数位数)转换为.net 的int类型、
<%
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>
<%}%>
试一下吧
<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";
}这样就可以了.