• λ我爱Aspx >> Asp.Net >> 即刻完成你的ASP.NET程序
  • 即刻完成你的ASP.NET程序

  • :aspxer  Դ:internet  :2007-5-20 16:33:47  ؼ:.net,asp.net,asp
  • TableName="Titles"

    Runat="Server" />

    具体效果请看:

    http://www.superexpertcontrols.com/superdatagrid/samples/sample1.aspx

    现在,我们来简单分析以上代码。第一行使调用SuperDataGrid控件,我们在以后的举例中都将使用到。第二行,和标准的DataGrid使用差不多,我们看看SuperDataGrid的一些属性:

    ConnectionString:因为是连接数据库,当然少不了数据库连接语句。这个参数就是连接数据的语句;

    TableName:要显示具体的表,我们就在这里定义。

    看到这里,我们已经感觉到了“简单”,但是,在实际的应用中,像这种直接显示一个表的情况是很少的。所以,我们需要其他更多的功能。最直接的,我们需要Select语句的返回结果。

    <%@ Register TagPrefix="Super" Namespace="Superexpert.Data"

    Assembly="Superexpert.SuperDataGrid" %>

    <Super:SuperDataGrid

    ConnectionString="Server=localhost;UID=sa;pwd=secret;database=Northwind"

    CommandText="Select ProductName, CategoryName

    From Products, Categories Where Products.CategoryID=Categories.CategoryID"

    Runat="Server" />

    具体效果请看:

    http://www.superexpertcontrols.com/superdatagrid/samples/sample2.aspx

    Ҷƪл˵?
  • һƪASP.NET中WebForm组件CheckBoxList编程(4)
    һƪ为Asp.net应用程序设置构建Web服务