T
TheBigGM
Guest
Hi All,
I hope you wont be too hard on me as Im new to VS Express for Web. Im currently creating a database and Im now designing the web page for it.
Ive stumbled and come across a coding error. The error comes up as:
Line 7: End Sub
Line 8:
Line 9: Protected Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Line 10:
Line 11: End Sub
And here is my coding:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml
<head runat="server
<title>NO PO NO PAY</title>
<style type="text/css
.auto-style1 {
width: 289px;
height: 100px;
}
.auto-style2 {
width: 425px;
height: 70px;
}
</style>
</head>
<body>
<form id="form1" runat="server
<br />
<img alt="" class="auto-style1" src="file:///C:/Users/Gareth/Documents/Database/Images/NWSSP.jpg" /> <img alt="" class="auto-style2" src="file:///C:/Users/Gareth/Documents/Untitled.png" /><br />
<br />
<aspetailsView ID="DetailsView1" runat="server" DefaultMode="Insert" Height="50px" Width="293px" AutoGenerateRows="False" DataKeyNames="NPNPID" DataSourceID="SqlDataSource1
<Fields>
<asp:BoundField DataField="NPNPID" HeaderText="ID" ReadOnly="True" SortExpression="NPNPID" />
<asp:BoundField DataField="OrganisationLevel1" HeaderText="Organisation" SortExpression="OrganisationLevel1" />
<asp:TemplateField HeaderText="Person Name" SortExpression="PersonID
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text=<%# Bind("PersonID") %>></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<%--<asp:TextBox ID="TextBox1" runat="server" Text=<%# Bind("PersonID") %>></asp:TextBox>--%>
<aspropDownList ID="ddlPerson" runat="server" DataSourceID="PersonLookup" DataTextField="PersonName" DataValueField="PersonID" AppendDataBoundItems="true
<asp:ListItem Value="" Text="Select... </asp:ListItem>
</aspropDownList>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text=<%# Bind("PersonID")%>></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Supplier" HeaderText="Supplier" SortExpression="Supplier" />
<asp:BoundField DataField="DateReceivedAP" HeaderText="Date Received in AP" SortExpression="DateReceivedAP" />
<asp:BoundField DataField="DateReturnedSupplier" HeaderText="Date Returned to Supplier" SortExpression="DateReturnedSupplier" />
<asp:BoundField DataField="ReturnedMethod" HeaderText="Returned Method" SortExpression="ReturnedMethod" />
<asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department" />
<asp:BoundField DataField="CostExVat" HeaderText="Cost Ex. VAT" SortExpression="CostExVat" />
<asp:BoundField DataField="CostIncVat" HeaderText="Cost Inc. VAT" SortExpression="CostIncVat" />
<asp:BoundField DataField="Notes" HeaderText="Notes" SortExpression="Notes" />
<asp:CheckBoxField DataField="Resolved" HeaderText="Resolved" SortExpression="Resolved" />
</Fields>
</aspetailsView>
<asp:SqlDataSource ID="PersonLookup" runat="server" ConnectionString="<%$ ConnectionStrings:NO PO NO PAYConnectionString2 %>" SelectCommand="SELECT [PersonID], [PersonName] FROM [Person] </asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NO PO NO PAYConnectionString %>" DeleteCommand="DELETE FROM [NPNP] WHERE [NPNPID] = @NPNPID" InsertCommand="INSERT INTO [NPNP] ([NPNPID], [OrganisationLevel1], [PersonID], [Supplier], [InvoiceNumber], [DateReceivedAP], [DateReturnedSupplier], [ReturnedMethod], [Department], [CostExVat], [CostIncVat], [Notes], [Resolved]) VALUES (@NPNPID, @OrganisationLevel1, @PersonID, @Supplier, @InvoiceNumber, @DateReceivedAP, @DateReturnedSupplier, @ReturnedMethod, @Department, @CostExVat, @CostIncVat, @Notes, @Resolved)" SelectCommand="SELECT * FROM [NPNP]" UpdateCommand="UPDATE [NPNP] SET [OrganisationLevel1] = @OrganisationLevel1, [PersonID] = @PersonID, [Supplier] = @Supplier, [InvoiceNumber] = @InvoiceNumber, [DateReceivedAP] = @DateReceivedAP, [DateReturnedSupplier] = @DateReturnedSupplier, [ReturnedMethod] = @ReturnedMethod, [Department] = @Department, [CostExVat] = @CostExVat, [CostIncVat] = @CostIncVat, [Notes] = @Notes, [Resolved] = @Resolved WHERE [NPNPID] = @NPNPID
<DeleteParameters>
<asparameter Name="NPNPID" Type="Int64" />
</DeleteParameters>
<InsertParameters>
<asparameter Name="NPNPID" Type="Int64" />
<asparameter Name="OrganisationLevel1" Type="Int64" />
<asparameter Name="PersonID" Type="Int32" />
<asparameter Name="Supplier" Type="String" />
<asparameter Name="InvoiceNumber" Type="Object" />
<asparameter DbType="Date" Name="DateReceivedAP" />
<asparameter DbType="Date" Name="DateReturnedSupplier" />
<asparameter Name="ReturnedMethod" Type="Int64" />
<asparameter Name="Department" Type="String" />
<asparameter Name="CostExVat" Type="Decimal" />
<asparameter Name="CostIncVat" Type="Decimal" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Resolved" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asparameter Name="OrganisationLevel1" Type="Int64" />
<asparameter Name="PersonID" Type="Int32" />
<asparameter Name="Supplier" Type="String" />
<asparameter Name="InvoiceNumber" Type="Object" />
<asparameter DbType="Date" Name="DateReceivedAP" />
<asparameter DbType="Date" Name="DateReturnedSupplier" />
<asparameter Name="ReturnedMethod" Type="Int64" />
<asparameter Name="Department" Type="String" />
<asparameter Name="CostExVat" Type="Decimal" />
<asparameter Name="CostIncVat" Type="Decimal" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Resolved" Type="Boolean" />
<asparameter Name="NPNPID" Type="Int64" />
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
I cant seem to spot the error and Im struggling to move forward. Any help would be much appreciated.
Thanks,
Gareth.
Continue reading...
I hope you wont be too hard on me as Im new to VS Express for Web. Im currently creating a database and Im now designing the web page for it.
Ive stumbled and come across a coding error. The error comes up as:
Line 7: End Sub
Line 8:
Line 9: Protected Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Line 10:
Line 11: End Sub
And here is my coding:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml
<head runat="server
<title>NO PO NO PAY</title>
<style type="text/css
.auto-style1 {
width: 289px;
height: 100px;
}
.auto-style2 {
width: 425px;
height: 70px;
}
</style>
</head>
<body>
<form id="form1" runat="server
<br />
<img alt="" class="auto-style1" src="file:///C:/Users/Gareth/Documents/Database/Images/NWSSP.jpg" /> <img alt="" class="auto-style2" src="file:///C:/Users/Gareth/Documents/Untitled.png" /><br />
<br />
<aspetailsView ID="DetailsView1" runat="server" DefaultMode="Insert" Height="50px" Width="293px" AutoGenerateRows="False" DataKeyNames="NPNPID" DataSourceID="SqlDataSource1
<Fields>
<asp:BoundField DataField="NPNPID" HeaderText="ID" ReadOnly="True" SortExpression="NPNPID" />
<asp:BoundField DataField="OrganisationLevel1" HeaderText="Organisation" SortExpression="OrganisationLevel1" />
<asp:TemplateField HeaderText="Person Name" SortExpression="PersonID
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text=<%# Bind("PersonID") %>></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<%--<asp:TextBox ID="TextBox1" runat="server" Text=<%# Bind("PersonID") %>></asp:TextBox>--%>
<aspropDownList ID="ddlPerson" runat="server" DataSourceID="PersonLookup" DataTextField="PersonName" DataValueField="PersonID" AppendDataBoundItems="true
<asp:ListItem Value="" Text="Select... </asp:ListItem>
</aspropDownList>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text=<%# Bind("PersonID")%>></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Supplier" HeaderText="Supplier" SortExpression="Supplier" />
<asp:BoundField DataField="DateReceivedAP" HeaderText="Date Received in AP" SortExpression="DateReceivedAP" />
<asp:BoundField DataField="DateReturnedSupplier" HeaderText="Date Returned to Supplier" SortExpression="DateReturnedSupplier" />
<asp:BoundField DataField="ReturnedMethod" HeaderText="Returned Method" SortExpression="ReturnedMethod" />
<asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department" />
<asp:BoundField DataField="CostExVat" HeaderText="Cost Ex. VAT" SortExpression="CostExVat" />
<asp:BoundField DataField="CostIncVat" HeaderText="Cost Inc. VAT" SortExpression="CostIncVat" />
<asp:BoundField DataField="Notes" HeaderText="Notes" SortExpression="Notes" />
<asp:CheckBoxField DataField="Resolved" HeaderText="Resolved" SortExpression="Resolved" />
</Fields>
</aspetailsView>
<asp:SqlDataSource ID="PersonLookup" runat="server" ConnectionString="<%$ ConnectionStrings:NO PO NO PAYConnectionString2 %>" SelectCommand="SELECT [PersonID], [PersonName] FROM [Person] </asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NO PO NO PAYConnectionString %>" DeleteCommand="DELETE FROM [NPNP] WHERE [NPNPID] = @NPNPID" InsertCommand="INSERT INTO [NPNP] ([NPNPID], [OrganisationLevel1], [PersonID], [Supplier], [InvoiceNumber], [DateReceivedAP], [DateReturnedSupplier], [ReturnedMethod], [Department], [CostExVat], [CostIncVat], [Notes], [Resolved]) VALUES (@NPNPID, @OrganisationLevel1, @PersonID, @Supplier, @InvoiceNumber, @DateReceivedAP, @DateReturnedSupplier, @ReturnedMethod, @Department, @CostExVat, @CostIncVat, @Notes, @Resolved)" SelectCommand="SELECT * FROM [NPNP]" UpdateCommand="UPDATE [NPNP] SET [OrganisationLevel1] = @OrganisationLevel1, [PersonID] = @PersonID, [Supplier] = @Supplier, [InvoiceNumber] = @InvoiceNumber, [DateReceivedAP] = @DateReceivedAP, [DateReturnedSupplier] = @DateReturnedSupplier, [ReturnedMethod] = @ReturnedMethod, [Department] = @Department, [CostExVat] = @CostExVat, [CostIncVat] = @CostIncVat, [Notes] = @Notes, [Resolved] = @Resolved WHERE [NPNPID] = @NPNPID
<DeleteParameters>
<asparameter Name="NPNPID" Type="Int64" />
</DeleteParameters>
<InsertParameters>
<asparameter Name="NPNPID" Type="Int64" />
<asparameter Name="OrganisationLevel1" Type="Int64" />
<asparameter Name="PersonID" Type="Int32" />
<asparameter Name="Supplier" Type="String" />
<asparameter Name="InvoiceNumber" Type="Object" />
<asparameter DbType="Date" Name="DateReceivedAP" />
<asparameter DbType="Date" Name="DateReturnedSupplier" />
<asparameter Name="ReturnedMethod" Type="Int64" />
<asparameter Name="Department" Type="String" />
<asparameter Name="CostExVat" Type="Decimal" />
<asparameter Name="CostIncVat" Type="Decimal" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Resolved" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asparameter Name="OrganisationLevel1" Type="Int64" />
<asparameter Name="PersonID" Type="Int32" />
<asparameter Name="Supplier" Type="String" />
<asparameter Name="InvoiceNumber" Type="Object" />
<asparameter DbType="Date" Name="DateReceivedAP" />
<asparameter DbType="Date" Name="DateReturnedSupplier" />
<asparameter Name="ReturnedMethod" Type="Int64" />
<asparameter Name="Department" Type="String" />
<asparameter Name="CostExVat" Type="Decimal" />
<asparameter Name="CostIncVat" Type="Decimal" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Resolved" Type="Boolean" />
<asparameter Name="NPNPID" Type="Int64" />
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
I cant seem to spot the error and Im struggling to move forward. Any help would be much appreciated.
Thanks,
Gareth.
Continue reading...