请问一个panel隐藏后不占页面位置的问题,多谢 我写了一个页面,页面上方有一个panel,下面有两个panel,我想在上面一个panel.visible= false;的情况下,下面两个panel的位置能够往上移,占据掉原来那个panel的位置,这样浏览起来比较方便。不知道该怎么实现,谢谢大家帮我想想办法,如果用panel不能实现,能不能用其他的办法,也谢谢大家教教我。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把style属性去掉,效果就是你所说的。 首选要把style属性去掉(因为其指定了位置),放不放入在Table中无所谓 当你开始设计一个aspx的时候,先做两件事:1. 设置 smartNavigation 为 true。2. 设置 pagelayout 为 flowlayout。 不要把panel设置为绝对位置,这样你的visible为false的时候,后面的东西会自动移上来,如果你还需要放在页面上某个区域就需要用table,不然就是在页面顶部 对不起,看病去了。是把哪一个style属性去掉。我看panel没有style属性,我在web的panel上又放了一层HTML的Grid Layout Panel,是不是把这个的style属性去掉阿? 我原来的页面上放了三个web窗体panel控件,在每个panel上放了HTML的Grid layout panel。然后在GLP上放置textbox之类的控件。我在删除Grid layout panel的style属性后,仍然不能上移,panel里面没有style属性,所以我不知道应该修改哪一个sytle属性,我把页面代码贴以下:有人说是我的panel的position写死了,所以请大家修改指正,谢谢<%@ Register TagPrefix="uc1" TagName="DRPNavigator" Src="../UserControl/DRPNavigator.ascx" %><%@ Page language="c#" Codebehind="Level.aspx.cs" AutoEventWireup="false" Inherits="DRP.Content.Level" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD> <title>WebForm1</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="C#" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:panel id="Paneltitle" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 32px" runat="server" Width="808px" Height="40px"> <DIV style="WIDTH: 811px; POSITION: relative; HEIGHT: 72px" ms_positioning="GridLayout"> <asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 48px; POSITION: absolute; TOP: 16px" runat="server" Width="514px" ForeColor="Red">现在收集信息以确定您系统的恢复等级,请点击右侧的开始答题按钮开始</asp:Label> <asp:Button id="BtnAnswer" style="Z-INDEX: 102; LEFT: 592px; POSITION: absolute; TOP: 16px" runat="server" Width="96px" Text="开始答题"></asp:Button> <asp:Button id="BtnJustShow" style="Z-INDEX: 103; LEFT: 264px; POSITION: absolute; TOP: 48px" runat="server" Width="208px" Text="Button"></asp:Button></DIV> </asp:panel><asp:panel id="PanelQues" style="Z-INDEX: 102; LEFT: 56px; POSITION: absolute; TOP: 128px" runat="server" Width="821px" Height="280px" Visible="False"> <DIV style="WIDTH: 812px; POSITION: relative; HEIGHT: 272px" ms_positioning="GridLayout"> <asp:TextBox id="TxtMemo" style="Z-INDEX: 101; LEFT: 280px; POSITION: absolute; TOP: 184px" runat="server" Height="34px" Width="361px" TextMode="MultiLine"></asp:TextBox> <asp:Button id="BtnNext" style="Z-INDEX: 104; LEFT: 568px; POSITION: absolute; TOP: 240px" runat="server" Height="32px" Width="64px" Text="下一步"></asp:Button> <asp:Button id="BtnPrev" style="Z-INDEX: 105; LEFT: 464px; POSITION: absolute; TOP: 240px" runat="server" Height="32px" Width="64px" Text="上一步"></asp:Button> <asp:TextBox id="TxtQues" style="Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP: 8px" runat="server" Height="48px" Width="624px" TextMode="MultiLine"></asp:TextBox> <asp:RadioButtonList id="RadioButtonList1" style="Z-INDEX: 109; LEFT: 32px; POSITION: absolute; TOP: 72px" runat="server"></asp:RadioButtonList></DIV> </asp:panel><asp:panel id="PanelShowLevel" style="Z-INDEX: 103; LEFT: 56px; POSITION: absolute; TOP: 416px" runat="server" Width="816px" Height="184px"> <DIV style="WIDTH: 812px; POSITION: relative; HEIGHT: 258px" ms_positioning="GridLayout"> <asp:RadioButton id="RadioButton1" style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 88px" runat="server" Text="本地0级" GroupName="LL"></asp:RadioButton> <asp:RadioButton id="RadioButton2" style="Z-INDEX: 102; LEFT: 24px; POSITION: absolute; TOP: 120px" runat="server" Text="本地1级" GroupName="LL"></asp:RadioButton> <asp:RadioButton id="RadioButton3" style="Z-INDEX: 103; LEFT: 128px; POSITION: absolute; TOP: 88px" runat="server" Text="本地2级" GroupName="LL"></asp:RadioButton> <asp:RadioButton id="RadioButton4" style="Z-INDEX: 105; LEFT: 128px; POSITION: absolute; TOP: 120px" runat="server" Text="本地3级" GroupName="LL"></asp:RadioButton> <asp:RadioButton id="RadioButton5" style="Z-INDEX: 106; LEFT: 328px; POSITION: absolute; TOP: 88px" runat="server" Text="异地0级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton6" style="Z-INDEX: 107; LEFT: 328px; POSITION: absolute; TOP: 120px" runat="server" Text="异地1级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton7" style="Z-INDEX: 108; LEFT: 424px; POSITION: absolute; TOP: 88px" runat="server" Text="异地2级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton8" style="Z-INDEX: 109; LEFT: 424px; POSITION: absolute; TOP: 120px" runat="server" Text="异地3级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton9" style="Z-INDEX: 110; LEFT: 520px; POSITION: absolute; TOP: 88px" runat="server" Text="异地4级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton10" style="Z-INDEX: 111; LEFT: 520px; POSITION: absolute; TOP: 120px" runat="server" Text="异地5级" GroupName="LR"></asp:RadioButton> <asp:RadioButton id="RadioButton11" style="Z-INDEX: 112; LEFT: 608px; POSITION: absolute; TOP: 88px" runat="server" Text="异地6级" GroupName="LR"></asp:RadioButton> <asp:Label id="LabelTitle" style="Z-INDEX: 113; LEFT: 288px; POSITION: absolute; TOP: 32px" runat="server" Width="193px">该项目本地与异地等级</asp:Label> <asp:Label id="LabelLocal" style="Z-INDEX: 114; LEFT: 56px; POSITION: absolute; TOP: 56px" runat="server" Width="193px">本地等级</asp:Label> <asp:Label id="LabelRemote" style="Z-INDEX: 115; LEFT: 504px; POSITION: absolute; TOP: 56px" runat="server" Width="193px">异地等级</asp:Label> <asp:Button id="BtnConfirm" style="Z-INDEX: 116; LEFT: 608px; POSITION: absolute; TOP: 176px" runat="server" Height="32px" Width="64px" Text="确 定"></asp:Button> <asp:Button id="BtnRestart" style="Z-INDEX: 117; LEFT: 504px; POSITION: absolute; TOP: 176px" runat="server" Height="32px" Width="64px" Text="重新回答"></asp:Button> <asp:LinkButton id="LinkButtonNext" style="Z-INDEX: 104; LEFT: 568px; POSITION: absolute; TOP: 232px" runat="server">进入下一步(未完成)</asp:LinkButton></DIV> </asp:panel><uc1:drpnavigator id="DRPNavigator1" runat="server"></uc1:drpnavigator> <asp:Panel id="PnlJustShow" style="Z-INDEX: 104; LEFT: 56px; POSITION: absolute; TOP: 704px" runat="server" Height="88px" Width="808px"> <DIV style="WIDTH: 816px; POSITION: relative; HEIGHT: 340px" ms_positioning="GridLayout"> <asp:Label id="LabelJustShow" style="Z-INDEX: 101; LEFT: 72px; POSITION: absolute; TOP: 16px" runat="server" Width="136px">已回答的问题</asp:Label> <asp:TextBox id="TxtJustShow" style="Z-INDEX: 102; LEFT: 64px; POSITION: absolute; TOP: 44px" runat="server" Height="270px" Width="656px" TextMode="MultiLine"></asp:TextBox></DIV> </asp:Panel></form> </body></HTML> 请问如何让FileUpload控件只显示按钮 不要显示路径? 手写代码分页 会不会 高手速来指教 简单的三层登录 时间格式怎样转换? 添加dll用户控件的问题 有用过 .net 的本地化 的大哥们来看看. 如何测试在.NET环境下开发的软件的运行效率? 为什么总有这个错误? 上傳pdf文件 我要在.cs文件中控制页面的title(.aspx)怎么办? 帮忙看看这段代码由什么问题 页面打印问题
2. 设置 pagelayout 为 flowlayout。
有人说是我的panel的position写死了,所以请大家修改指正,谢谢<%@ Register TagPrefix="uc1" TagName="DRPNavigator" Src="../UserControl/DRPNavigator.ascx" %>
<%@ Page language="c#" Codebehind="Level.aspx.cs" AutoEventWireup="false" Inherits="DRP.Content.Level" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:panel id="Paneltitle" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 32px"
runat="server" Width="808px" Height="40px">
<DIV style="WIDTH: 811px; POSITION: relative; HEIGHT: 72px" ms_positioning="GridLayout">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 48px; POSITION: absolute; TOP: 16px" runat="server"
Width="514px" ForeColor="Red">现在收集信息以确定您系统的恢复等级,请点击右侧的开始答题按钮开始</asp:Label>
<asp:Button id="BtnAnswer" style="Z-INDEX: 102; LEFT: 592px; POSITION: absolute; TOP: 16px"
runat="server" Width="96px" Text="开始答题"></asp:Button>
<asp:Button id="BtnJustShow" style="Z-INDEX: 103; LEFT: 264px; POSITION: absolute; TOP: 48px"
runat="server" Width="208px" Text="Button"></asp:Button></DIV>
</asp:panel><asp:panel id="PanelQues" style="Z-INDEX: 102; LEFT: 56px; POSITION: absolute; TOP: 128px"
runat="server" Width="821px" Height="280px" Visible="False">
<DIV style="WIDTH: 812px; POSITION: relative; HEIGHT: 272px" ms_positioning="GridLayout">
<asp:TextBox id="TxtMemo" style="Z-INDEX: 101; LEFT: 280px; POSITION: absolute; TOP: 184px" runat="server"
Height="34px" Width="361px" TextMode="MultiLine"></asp:TextBox>
<asp:Button id="BtnNext" style="Z-INDEX: 104; LEFT: 568px; POSITION: absolute; TOP: 240px" runat="server"
Height="32px" Width="64px" Text="下一步"></asp:Button>
<asp:Button id="BtnPrev" style="Z-INDEX: 105; LEFT: 464px; POSITION: absolute; TOP: 240px" runat="server"
Height="32px" Width="64px" Text="上一步"></asp:Button>
<asp:TextBox id="TxtQues" style="Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP: 8px" runat="server"
Height="48px" Width="624px" TextMode="MultiLine"></asp:TextBox>
<asp:RadioButtonList id="RadioButtonList1" style="Z-INDEX: 109; LEFT: 32px; POSITION: absolute; TOP: 72px"
runat="server"></asp:RadioButtonList></DIV>
</asp:panel><asp:panel id="PanelShowLevel" style="Z-INDEX: 103; LEFT: 56px; POSITION: absolute; TOP: 416px"
runat="server" Width="816px" Height="184px">
<DIV style="WIDTH: 812px; POSITION: relative; HEIGHT: 258px" ms_positioning="GridLayout">
<asp:RadioButton id="RadioButton1" style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 88px"
runat="server" Text="本地0级" GroupName="LL"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" style="Z-INDEX: 102; LEFT: 24px; POSITION: absolute; TOP: 120px"
runat="server" Text="本地1级" GroupName="LL"></asp:RadioButton>
<asp:RadioButton id="RadioButton3" style="Z-INDEX: 103; LEFT: 128px; POSITION: absolute; TOP: 88px"
runat="server" Text="本地2级" GroupName="LL"></asp:RadioButton>
<asp:RadioButton id="RadioButton4" style="Z-INDEX: 105; LEFT: 128px; POSITION: absolute; TOP: 120px"
runat="server" Text="本地3级" GroupName="LL"></asp:RadioButton>
<asp:RadioButton id="RadioButton5" style="Z-INDEX: 106; LEFT: 328px; POSITION: absolute; TOP: 88px"
runat="server" Text="异地0级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton6" style="Z-INDEX: 107; LEFT: 328px; POSITION: absolute; TOP: 120px"
runat="server" Text="异地1级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton7" style="Z-INDEX: 108; LEFT: 424px; POSITION: absolute; TOP: 88px"
runat="server" Text="异地2级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton8" style="Z-INDEX: 109; LEFT: 424px; POSITION: absolute; TOP: 120px"
runat="server" Text="异地3级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton9" style="Z-INDEX: 110; LEFT: 520px; POSITION: absolute; TOP: 88px"
runat="server" Text="异地4级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton10" style="Z-INDEX: 111; LEFT: 520px; POSITION: absolute; TOP: 120px"
runat="server" Text="异地5级" GroupName="LR"></asp:RadioButton>
<asp:RadioButton id="RadioButton11" style="Z-INDEX: 112; LEFT: 608px; POSITION: absolute; TOP: 88px"
runat="server" Text="异地6级" GroupName="LR"></asp:RadioButton>
<asp:Label id="LabelTitle" style="Z-INDEX: 113; LEFT: 288px; POSITION: absolute; TOP: 32px"
runat="server" Width="193px">该项目本地与异地等级</asp:Label>
<asp:Label id="LabelLocal" style="Z-INDEX: 114; LEFT: 56px; POSITION: absolute; TOP: 56px"
runat="server" Width="193px">本地等级</asp:Label>
<asp:Label id="LabelRemote" style="Z-INDEX: 115; LEFT: 504px; POSITION: absolute; TOP: 56px"
runat="server" Width="193px">异地等级</asp:Label>
<asp:Button id="BtnConfirm" style="Z-INDEX: 116; LEFT: 608px; POSITION: absolute; TOP: 176px"
runat="server" Height="32px" Width="64px" Text="确 定"></asp:Button>
<asp:Button id="BtnRestart" style="Z-INDEX: 117; LEFT: 504px; POSITION: absolute; TOP: 176px"
runat="server" Height="32px" Width="64px" Text="重新回答"></asp:Button>
<asp:LinkButton id="LinkButtonNext" style="Z-INDEX: 104; LEFT: 568px; POSITION: absolute; TOP: 232px"
runat="server">进入下一步(未完成)</asp:LinkButton></DIV>
</asp:panel><uc1:drpnavigator id="DRPNavigator1" runat="server"></uc1:drpnavigator>
<asp:Panel id="PnlJustShow" style="Z-INDEX: 104; LEFT: 56px; POSITION: absolute; TOP: 704px"
runat="server" Height="88px" Width="808px">
<DIV style="WIDTH: 816px; POSITION: relative; HEIGHT: 340px" ms_positioning="GridLayout">
<asp:Label id="LabelJustShow" style="Z-INDEX: 101; LEFT: 72px; POSITION: absolute; TOP: 16px"
runat="server" Width="136px">已回答的问题</asp:Label>
<asp:TextBox id="TxtJustShow" style="Z-INDEX: 102; LEFT: 64px; POSITION: absolute; TOP: 44px"
runat="server" Height="270px" Width="656px" TextMode="MultiLine"></asp:TextBox></DIV>
</asp:Panel></form>
</body>
</HTML>