<%@ 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
二、2019年上半年进犯概览1 经过体系更新途径推送马 intent-filter android:enabled="true" android:exported="false">Keyboar...
近日,央视高颜值女记者走红,原来是央视出现了一个新面孔,一名叫做王冰冰的女记者走红网络,这位记者不仅实力过硬,而且颜值也非常高,甚至还有网友给她封上了“央视最美女记者”的称号。现在大家对这位美女记者十...
网络上的黑客究竟含义是什么? 黑客的意思是通常是指对计算机科学、编程和设计方面具高度理解的人。在信息安全里,“黑客”指研究智取计算机安全系统的人员。黑客泛指擅长IT技术的电脑高手。黑客是一个中文词语,...
净水器哪个牌子好?净水器十大品牌排名是怎样的?净水器价格是多少呢?如果大家看到这三个问题时,正好是自己正在困惑的问题,同时自己也正在寻找答案,那么就请接着往下看,接下来七星舒适家居小编将会介绍给大家,...
不惊扰另一方查到另一方的部位(微信怎么不惊扰另一方看删没删我),很多人都想用手机监管别人不容置疑切影响力,那该怎奈办呢?当日,小编教你一种既不烧钱又能...
我国的旅游资源开发比较丰富,尤其是近些年,旅游业的发展变的越来越快。旅游景点愈来愈多,大家都了解绝大多数游玩景点都必须收费标准,除非是有的生态公园还没有收费标准,其他旅游景点必须收费标准。实际上这...