我在C#.Net里面做了 一个界面
效果如图代码如下
<table style="width: 220px; height: 1px; background-repeat:no-repeat" background="jpg/login/login.gif" cellpadding=0 cellspacing=0 border=0>
            <tr valign =top>
                <td colspan="0" rowspan="0">
                    <table style="width: 214px; height: 107px;" cellpadding=0 cellspacing=0 border=0>
                        <tr>
                            <td style="width: 62px" rowspan="4">
                            </td>
                            <td style="width: 82px; height: 12px;" rowspan="2" valign=bottom>
                    <asp:TextBox ID="UserName_TBox" runat="server" Height="12px" Width="82px"></asp:TextBox></td>
                            <td style="width: 60px" rowspan="4">
                                <asp:ImageButton ID="Login_IB" runat="server" OnClick="Login_IB_Click1" ImageUrl="~/jpg/login/button.gif" Width="55px" /></td>
                        </tr>
                        <tr>
                        </tr>
                        <tr>
                            <td rowspan="2" style="width: 82px; height:12px" valign=top>
                    <asp:TextBox ID="PWD_TBox" runat="server" Width="82px" Height="12px" TextMode="Password"></asp:TextBox></td>
                        </tr>
                        <tr>
                        </tr>
                    </table>
                </td>
        </table>    现在遇到的问题是一旦用户名密码不匹配,弹出错误提示后再回到本页时,两个textbox框的高度就变成了原来的一半。字符显示不全,找了半天不知道为什么,希望大家帮帮忙,谢谢了。

解决方案 »

  1.   

    你看看你的<tr></tr>有几个里面没有<td></td>
      

  2.   

    虽然我没看到图……(PS:右键地址竟然是本地的……我晕……)但是大概原因可能就是你在后台用了Response.Write();输出的弹出框对吧?用这个输出后页面加载CSS就会出问题……建议不要如此使用……
      

  3.   

    我确实是用的 response。write 请问2楼有什么解决方法吗??
      

  4.   


    Page.ClientScript.RegisterStartupScript(Page.GetType(), "ajaxjs", "alert('登陆成功!');", true);
    这样就可以了……