Thread: My welcome page

    #1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Dec 2005
    Posts
    261
    Rep Power
    13

    My welcome page


    Hello

    I have some code where strEmail is the name of my database email column, strEmailValue is the user's email address typed into the email field in a log-on form, and strEmailText is the ID of the email field.

    In myLogon.aspx.vb page, I have:

    Code:
    Protected Sub LogonBtn_Click(sender As Object, e As EventArgs) Handles LogonBtn.Click  
    
                'Authenticate user    
    
             Dim Authenticated As Boolean = Authenticate(strEmailTextBox.Text, passwordTextBox.Text)  
    
             'If results found then redirect to the userpage.aspx  
    
             If Authenticated Then  
    
            Dim target = String.Format("~/userpage.aspx?strEmailValue={0}", strEmailTextBox.Text)  
    
           Response.Redirect(target, False)  
    
           End If  
    
         End Sub
    And in userpage.aspx, where the user's email should appear to say 'Welcome you@yoursite.com', I have this in
    userpage.aspx.vb:

    Code:
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load  
    
               If Not IsPostBack Then  
    
                   Dim strEmailValue As String = "strEmailValue".ToString()  
    
                   Label2.Text = "Hello " & strEmailValue & ", welcome!" 
    
               End If    
    
            End Sub
    But the user's email address not appear on userpage.aspx. Instead, the page shows: 'Hello strEmailValue, welcome!'

    Here is the page:

    User page

    How would I correct that, please?

    Many thanks

    Steve
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Aug 2008
    Location
    USA
    Posts
    1,606
    Rep Power
    347
    i would suggest after validation , don't pass the userid (email) in query string better create session variable and you can access that variable any where in the entire website

    Like below

    Code:
    protected void Page_Load(object sender, EventArgs e)
     {
          if (Session["name"] != null)
          {
               lblName.Text = Session["name"].ToString();
          }
     }
    Kiran
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

    Jquery Shake Effect ,
    Andriod KitKat


    Thank You,
    KiranK

Similar Threads

  1. how to privent page break when printing long HTML page?
    By cutecode in forum HTML, JavaScript And CSS Help
    Replies: 9
    Last Post: August 4th, 2010, 02:13 AM
  2. Replies: 3
    Last Post: September 28th, 2006, 11:56 PM
  3. aspx page takes over the main page on form submit
    By NuclearNation in forum .NET Development
    Replies: 1
    Last Post: August 10th, 2004, 02:35 AM
  4. Replies: 0
    Last Post: June 22nd, 2001, 03:06 AM
  5. Append data returned by ASP page to existing HTML form page?
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: July 13th, 2000, 01:07 PM

IMN logo majestic logo threadwatch logo seochat tools logo