If you are using a Master Page you need to get a reference to the ContentPlaceholder first. Something like
Code:Confirm.aspx code behind Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If PreviousPage IsNot Nothing Then If PreviousPage.IsCrossPagePostBack Then Dim ph As ContentPlaceHolder = CType(PreviousPage.Master.FindControl("cphBodyContent"), ContentPlaceHolder) Dim txt As TextBox If Not ph Is Nothing Then txt = ph.FindControl("txtQuantity") If Not txt Is Nothing Then lblQuantity.Text = "You have ordered " & txt.Text & " " & PreviousPage.SoftwareName & " items." End If End If End If End If End Sub




Reply With Quote