首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

设计时有checkbox,运行时就没有了,小弟我是拖放过去的,估计是html的有关问题,所以把html代码复制过来了

2011-12-31 
设计时有checkbox,运行时就没有了,我是拖放过去的,估计是html的问题,所以把html代码复制过来了设计时有che

设计时有checkbox,运行时就没有了,我是拖放过去的,估计是html的问题,所以把html代码复制过来了
设计时有checkbox,运行时就没有了,我是拖放过去的,估计是html的问题,所以把html代码复制过来了:
<%@   Page   Language= "C# "   AutoEventWireup= "true "     CodeFile= "Default.aspx.cs "   Inherits= "_Default "   %>

<!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 "   >
<head   runat= "server ">
        <title> 无标题页 </title>
</head>
<body>
        <form   id= "form1 "   runat= "server ">
        <div>
                &nbsp;&nbsp;
                <asp:Button   ID= "btn_update "   runat= "server "   Style= "z-index:   101;   left:   270px;   position:   absolute;
                        top:   139px "   Text= "修改 "   OnClick= "btn_update_Click "   />
                <asp:Button   ID= "btn_Del "   runat= "server "   Style= "left:   304px;   position:   relative;   top:   122px "
                        Text= "删除 "   OnClick= "btn_Del_Click "   />
                <asp:Button   ID= "btn_search "   runat= "server "   Style= "left:   335px;   position:   relative;
                        top:   123px "   Text= "查询 "   OnClick= "btn_search_Click "   CausesValidation= "False "   />
                <asp:CustomValidator   ID= "CustomValidator1 "   runat= "server "   ControlToValidate= "txtID "
                        Display= "Dynamic "   ErrorMessage= "该用户已经存在 "   OnServerValidate= "CustomValidator1_ServerValidate "
                        Style= "z-index:   102;   left:   426px;   position:   absolute;   top:   15px "> </asp:CustomValidator>
                <asp:RequiredFieldValidator   ID= "RequiredFieldValidator1 "   runat= "server "   ControlToValidate= "txtName "
                        ErrorMessage= "* "   Style= "z-index:   103;   left:   430px;   position:   absolute;   top:   43px "> </asp:RequiredFieldValidator>
                <asp:Button   ID= "btn_Add "   runat= "server "   Style= "z-index:   104;   left:   201px;   position:   absolute;
                        top:   139px "   Text= "增加 "   OnClick= "btn_Add_Click "   />


                <asp:TextBox   ID= "txtID "   runat= "server "   Style= "z-index:   105;   left:   244px;   position:   absolute;
                        top:   16px "> </asp:TextBox>
                <asp:Label   ID= "Label1 "   runat= "server "   Style= "z-index:   106;   left:   173px;   position:   absolute;
                        top:   19px "   Text= "编号 "> </asp:Label>
                <asp:TextBox   ID= "txtName "   runat= "server "   Style= "z-index:   107;   left:   247px;   position:   absolute;
                        top:   48px "> </asp:TextBox>
                <asp:Label   ID= "Label2 "   runat= "server "   Style= "z-index:   108;   left:   173px;   position:   absolute;
                        top:   44px "   Text= "姓名 "> </asp:Label>
                <asp:Label   ID= "Label3 "   runat= "server "   Style= "z-index:   109;   left:   175px;   position:   absolute;
                        top:   79px "   Text= "性别 "> </asp:Label>
                <asp:RadioButton   ID= "RadioButton1 "   runat= "server "   Checked= "True "   GroupName= "sex "
                        Style= "z-index:   110;   left:   241px;   position:   absolute;   top:   84px "   Text= "男 "   />
                <asp:RadioButton   ID= "RadioButton2 "   runat= "server "   GroupName= "sex "   Style= "z-index:   111;
                        left:   324px;   position:   absolute;   top:   85px "   Text= "女 "   />
                       
       
        </div>
                <asp:DetailsView   ID= "DetailsView1 "   runat= "server "   Height= "105px "   Style= "left:   486px;
                        position:   relative;   top:   123px "   Width= "163px ">
                </asp:DetailsView>
                <asp:CheckBox   ID= "chkPID "   runat= "server "   Style= "left:   566px;   position:   relative;
                        top:   -165px "   />


                <asp:CheckBox   ID= "chkName "   runat= "server "   Style= "left:   476px;   position:   relative;
                        top:   -103px "   />
                <asp:CheckBox   ID= "chk_pid "   runat= "server "   Style= "left:   382px;   position:   relative;
                        top:   -134px "   />
                <asp:CheckBox   ID= "chk_sex "   runat= "server "   Style= "left:   275px;   position:   relative;
                        top:   -61px "   Checked= "True "   /> &nbsp;
                <asp:GridView   ID= "GridView1 "   runat= "server "   Style= "position:   relative;   left:   0px;   top:   -6px; ">
                </asp:GridView>
                <asp:FormView   ID= "FormView1 "   runat= "server "   Style= "position:   relative ">
                </asp:FormView>
                &nbsp;
        </form>
</body>
</html>

顺便问一句,页面设计时大家还是用vs2005吗?我用他设计总感觉很别扭,就象上面的checkbox,明明是拖放过去的,但是运行时就是没有,
我想过用dream   weaver   8,但是vs2005作的整齐页面在dw里面也是乱哄哄的,根本就没法改;有时候在dw8改好了,到vs2005,又乱了,大家都是怎么解决这个问题的?


[解决办法]
<asp:CheckBox ID= "chkPID " runat= "server " Style= "left: 566px; position: relative;
top: -165px " />

-165 < 0 都跑到浏览器顶部之外去了,
[解决办法]
...

热点排行