View Data Page
(1) Right-click on path to your project
(2) Add New Item
(3) Choose Web form
(4) Call it
OK_Submitting
(5) Say Yes to Master Page to it is included
(6) Right-click on path to your project again
(7) Hit Add New Item
(8) Choose Dataset
(9) Name it whatever you want
(a) Say Yes when you get a pop up
(b) Your database should now be listed in dropdown
(c) Hit All defaults, Next, Next, Next
(d) When asked to type up query, use 'Query Builder' instead
(e) Add database table being used in this project
(f) Choose all colums in Query builder view
(g) Say OK, then Finish
(h) Go back to
OK_Submitting page
(i) Choose desgin view
(j) Drag from your left, under Data, a Gridview (Gridview1 as default)
(k) Bind to DataSource using Choose Data Source
(l) Choose Object in Data Source Configuration wizard pop up
(m) Bind to YourTableNameTableAdapter option from dropdown
(n) Hit Next, if not already selected, choose only option in dropdown
(o) Hit Next, then Finish
Now you can add code below... -
<%@ Page Language="VB" MasterPageFile="~/DashMaster.master" Title="Thank You Page" %>
-
-
<script runat="server">
-
-
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
-
-
End Sub
-
-
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
-
If Button1.Enabled Then
-
Server.Transfer("SubmitPage.aspx")
-
'Else
-
'Server.Transfer("OK_Submitting.aspx")
-
End If
-
End Sub
-
</script>
-
-
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
-
Why, Thank you!<br />
-
<br />
-
Please take a look at your submissions<br />
-
<br />
-
-
-
-
-
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
-
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" Width="231px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
-
<Columns>
-
<asp:CommandField ShowSelectButton="True" />
-
<asp:BoundField DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress" />
-
</Columns>
-
</asp:GridView>
-
<br />
-
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Go Back to Add more Data"
-
Width="205px" /><br />
-
<br />
-
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
-
SelectMethod="GetData" TypeName="DataSet1TableAdapters.EmailTableAdapter">
-
</asp:ObjectDataSource>
-
-
-
-
<br />
-
<br />
-
<br />
-
-
<br />
-
</asp:Content>
-
-
Problem submitting page next...