<%@ Import Namespace="DataServices" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<html>
<script language="C#" runat="server">
protected void Page_Load(Object Src, EventArgs E)
{
DataService d = new DataService();
DataSet myData = d.GetTitleAuthors();
Authors_DataGrid.DataSource=myData.Tables["Authors"].DefaultView;
Authors_DataGrid.DataBind();
Message.InnerHtml = "The number of rows is: " + myData.Tables["Authors"].Rows.Count.ToString();
}
protected void Submit_DataSet(Object Src, EventArgs E)
{
DataService d = new DataService();
DataSet myData = d.GetTitleAuthors();
//Remove three rows from the Authors table
myData.Tables["Authors"].Rows.Remove(0);
myData.Tables["Authors"].Rows.Remove(1);
myData.Tables["Authors"].Rows.Remove(2);
int rowCount = d.PutTitleAuthors(myData);
Message.InnerHtml = "The modified number of rows is: " + rowCount.ToString();
}
</script>
<body style="font: 10pt verdana">
<h4>Using Data Access with Web Services</h4>
<form runat="server">
<input type="submit" OnServerclick="Submit_DataSet" value="Remove three rows from the DataSet"
runat="server"/>
<p>
<span id="Message" runat="server"/>
<p>
<ASP:DataGrid id="Authors_DataGrid" runat="server"
Width="700"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
MaintainState="false"
/>
</form>
</body>
--------#VB----------------
<%@ Import Namespace="DataServices" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<html>
<script language="VB" runat="server">
Protected Sub Page_Load(Src As Object, E As EventArgs)
Dim D As DataService = New DataService()
Dim MyData As DataSet = D.GetTitleAuthors()
Authors_DataGrid.DataSource=MyData.Tables("Authors").DefaultView
Authors_DataGrid.DataBind()
Message.InnerHtml = "The number of rows is: " & MyData.Tables("Authors").Rows.Count.ToString()
End Sub
Protected Sub Submit_DataSet(Src As Object, E As EventArgs)
Dim D As DataService = New DataService()
Dim MyData As DataSet = D.GetTitleAuthors()
'Remove three rows from the Authors table
MyData.Tables("Authors").Rows.Remove(0)
MyData.Tables("Authors").Rows.Remove(1)
MyData.Tables("Authors").Rows.Remove(2)
Dim RowCount As Integer = D.PutTitleAuthors(MyData)
Message.InnerHtml = "The modified number of rows is: " & RowCount.ToString()
End Sub
找黑客帮忙值得信任吗相关问题 黑客攻击资金盘相关问题 怎么变成黑客ios 怎么防止qq被盗号(qq如何防止盗号)...
哪里能找到黑客高手帮忙(寻找 黑客高手 帮忙)(tiechemo.com)一直致力于黑客(HACK)技术、黑客QQ群、信息安全、web安全、渗透运维、黑客工具、找黑客、黑客联系方式、24小时在线网络黑...
如何远程监听对方手机(远程监控对方手机内容) 随着科技进步和时代发展,智能机的出现,极大地方便了人们的日常出行、办公生活等方面。将人们只能使用手机接打电话、接发短信等一些方式,逐渐变成了吃穿住行都可以...
丰花月季(这4个丰花月季全部满足你!) 我们颜控就是这么无理取闹理智! 而且我只是想要一个又好看又好养又容易爆盆又Balabala…的月季? ——其实不难,只要选对优秀的月季品种就ok。...
有些人的皮肤容易因干燥缺水而产生各种问题,例如皮肤紧绷发痒,起皮干裂等,所以这个时候皮肤需要更加细心的对待,不只是敷敷面膜涂涂乳液就可以了,而是需要从洗脸、保养方式等各个方面都做适当的调整才行。下面就...
【不认可高人一等的国家】王毅回应美方对华反复提竞争合作对抗近日,王毅接受媒体采访时表示,关于美方就对华关系反复提出的竞争、合作、对抗几个说法,中方的立场是一贯和明确的。如果要对话,中方的大门随时敞开,...