basically i have an simple asp.net web site with a registration page and then a summary page where the values from the registration page are posted in labels on the summary page. i use a master page for the layout
ive searched tried different code but they all seem to give me errors.
any help/pointers, i'd be greatful.
here is the code for the register page Register.aspx
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Register.aspx.vb" Inherits="Register" title="Register" %> <asp:Content ID="Content1" ContentPlaceHolderID="Contentplaceholder1" Runat="Server"> <br /> <asp:TextBox ID="txtFirstName" runat="server" Style="z-index: 100; left: 303px; position: absolute; top: 172px"></asp:TextBox> <br /> <asp:Button ID="btnSubmit" PostBackUrl="~/Summary.aspx" runat="server" Style="z-index: 109; left: 261px; position: absolute; top: 328px" Text="Submit" />
And the summary page code Summary.aspx
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Summary.aspx.vb" Inherits="Summary" title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> asp:Label ID="lblFirstName" runat="server" Style="z-index: 106; left: 181px; position: absolute; top: 278px" Text="FirstName"></asp:Label> </asp:Content>
And the code behind the summary page
summary.aspx.vb
Partial Class Search
Inherits System.Web.UI.Page
If Not Page.PreviousPage Is Nothing Then
Dim SourceTextBox As TextBox
SourceTextBox = CType(PreviousPage.FindControl("txtFirstName"), _
TextBox)
If Not SourceTextBox Is Nothing Then
lbl.FirstName = SourceTextBox.Text
End If
End If
End Class


Sign In
Create Account

Back to top









