1、08有时无法添加WEB控件,重新新建一个后就可以了。囧~2、2005的可以显示控件,而2008却只显示文本,我目前正在重装08的。不清楚什么原因。希望有朋友可以帮忙解答一下。

解决方案 »

  1.   

    <%@ 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>
        <style type="text/css">
            .style1
            {
                width: 41%;
            }
            .style2
            {
                width: 59px;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
            <table class="style1">
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label1" runat="server" Text="项目:"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server">
                            <asp:ListItem>SQL Server 2005 and XML</asp:ListItem>
                            <asp:ListItem>Office 2003 and XML</asp:ListItem>
                            <asp:ListItem>Introduction to ASP.NET</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label2" runat="server" Text="姓氏:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" Width="178px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label3" runat="server" Text="名字:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" Width="178px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label4" runat="server" Text="邮箱:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox3" runat="server" Width="178px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        <asp:Button ID="提交" runat="server" Text="Button" Width="174px" />
                    </td>
                </tr>
            </table>
        
        </div>
        </form>
    </body>
    </html>麻烦了!