【心得】create a data table in webMatrix is very easy!
2004-12-03 14:50
435 查看
我是刚downloaded这个工具,现在正在testing……,发现他的确很好用,比如现在你要读取数据
你首先在data窗口设置好你需要读取的数据库,然后你把目标表直接拖到页面中,然后你什么也不做,这个时候,直接运行该页面,webmatrix会自动启动web matrix server,你发现数据已经读出来了,你根本不需要设置连接字符,也不要在unload里写sub,就可以直接读出数据来了,是不是很easy…………
浏览code,发现他已经自动完成了数据度曲的代码,代码如下:
<form runat="server">
<wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=F:\Test\webmatrix\Dqsm.mdb" SelectCommand="SELECT * FROM [AllStore]"></wmx:AccessDataSourceControl>
<wmx:MxDataGrid id="MxDataGrid1" runat="server" AllowPaging="True" CellPadding="3" BorderStyle="None" DataSourceControlID="AccessDataSourceControl1" AllowSorting="True" BorderWidth="1px" BackColor="White" DataMember="AllStore" BorderColor="#CCCCCC" DataKeyField="StoreID">
<FooterStyle forecolor="#000066" backcolor="White"></FooterStyle>
<SelectedItemStyle forecolor="White" font-bold="True" backcolor="#669999"></SelectedItemStyle>
<PagerStyle backcolor="White" mode="NumericPages" horizontalalign="Center" forecolor="#000066"></PagerStyle>
<HeaderStyle forecolor="White" font-bold="True" backcolor="#006699"></HeaderStyle>
<ItemStyle forecolor="#000066"></ItemStyle>
</wmx:MxDataGrid>
<!-- Insert content here -->
</form>
运行的结果如下:
好了,先到这里,因为我也正在学习中
如果想要得到更多的学习资源,请到这里
你首先在data窗口设置好你需要读取的数据库,然后你把目标表直接拖到页面中,然后你什么也不做,这个时候,直接运行该页面,webmatrix会自动启动web matrix server,你发现数据已经读出来了,你根本不需要设置连接字符,也不要在unload里写sub,就可以直接读出数据来了,是不是很easy…………
浏览code,发现他已经自动完成了数据度曲的代码,代码如下:
<form runat="server">
<wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=F:\Test\webmatrix\Dqsm.mdb" SelectCommand="SELECT * FROM [AllStore]"></wmx:AccessDataSourceControl>
<wmx:MxDataGrid id="MxDataGrid1" runat="server" AllowPaging="True" CellPadding="3" BorderStyle="None" DataSourceControlID="AccessDataSourceControl1" AllowSorting="True" BorderWidth="1px" BackColor="White" DataMember="AllStore" BorderColor="#CCCCCC" DataKeyField="StoreID">
<FooterStyle forecolor="#000066" backcolor="White"></FooterStyle>
<SelectedItemStyle forecolor="White" font-bold="True" backcolor="#669999"></SelectedItemStyle>
<PagerStyle backcolor="White" mode="NumericPages" horizontalalign="Center" forecolor="#000066"></PagerStyle>
<HeaderStyle forecolor="White" font-bold="True" backcolor="#006699"></HeaderStyle>
<ItemStyle forecolor="#000066"></ItemStyle>
</wmx:MxDataGrid>
<!-- Insert content here -->
</form>
运行的结果如下:
好了,先到这里,因为我也正在学习中
如果想要得到更多的学习资源,请到这里
相关文章推荐
- 使用 Java Servlets 2.4 来执行过滤
- 利用JavaScript制作倒计时牌
- 汉字转拼音缩写
- 使用PPC听收音机
- 对比.NET PetShop和Duwamish来探讨Ado.NET的数据库编程模式
- JDBC RowSet 执行规范刚刚在JCP上最终通过投票
- 我的计数器!
- 随感一则
- 给我留言
- Test Manager Responsibility
- Oracle 问题问答
- Smart Client 又一轮宣传攻势
- Product cycle model
- Singleton模式的C++实现研究(转载)
- PocketPC应用 - 将磁带转录到PocketPC!
- 一位老工程师的终告 [转]
- 录音机
- COM组件中在工作线程中产生事件的解决方法。
- 项目规模的界定!
- 一个简洁明了的递归函数——判断[麻将]的和牌