DropDownList1.DataSource=DS.Tables("class").DefaultView;
就是这句!!!!!!!!!!!!!??????????

解决方案 »

  1.   

    在C#中,属性应使用[],方法才用()
    试改为
    DropDownList1.DataSource=DS.Tables["class"].DefaultView;
      

  2.   

    改为DropDownList1.DataSource=DS.Tables["class"].DefaultView;
      

  3.   

    在求教
    <asp:DropDownList id="classname" style="Z-INDEX: 101; LEFT: 287px; POSITION: absolute; TOP: 197px" runat="server" DataTextField="classname" DataValueField="classname"></asp:DropDownList>代码中叶改为
    classname.DataSource=DS.Tables["class"].DefaultView;
    classname.DataBind();
    string StrSql="select classname from class";为何显示Server Error in '/exercise' Application.
    --------------------------------------------------------------------------------Access to the path "D:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\exercise\ef46110a\64a4c380\hash.web" is denied. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.