Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:30:13+00:00 2026-05-26T19:30:13+00:00

I am a newbie in using asp.net with code behind of vb.net I just

  • 0

I am a newbie in using asp.net with code behind of vb.net I just wanna know on how to see the name of the admin on the POS page. it seems that this code doesn’t work??

Main.lbl_name.Text = CurName.ToUpper
POS.lbl_cashier.Text = CurName.ToUpper 



Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim cmd1 As New SqlCommand
        Dim rdr As SqlDataReader

        cmd1.Connection = cn
        cmd1.Connection.Open()
        cmd1.CommandText = "SELECT * from UserTable WHERE Username ='" & txt_username.Text & "'"
        rdr = cmd1.ExecuteReader

        If rdr.HasRows = True Then
            rdr.Read()
            If txt_username.Text = rdr.Item(0) And txt_password.Text = rdr.Item(3) Then
                CurPos = rdr.Item("Type")
                CurUser = rdr.Item("Username")
                CurName = rdr.Item("EmployeeName")

                If rdr.Item(4) = "ADMINISTRATOR" Then
                    MsgBox("WELCOME! " & rdr.Item(4), MsgBoxStyle.Information)
                    'Main.lbl_name.Text = CurName.ToUpper
                    'POS.lbl_cashier.Text = CurName.ToUpper
                    cmd1.Connection.Close()
                    Response.Redirect("ACESCHOOLSUPPLIES.aspx")
                    'Me.Dispose()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:30:13+00:00Added an answer on May 26, 2026 at 7:30 pm

    You can’t just access other pages, ASP.NET runtime is ignorant about other pages, you have access to your current page only!

    You can use the Session variable to store some data temporarily for current user session, the Session object is available on every ASP.NET Page.

      Session("adminname") = CurName
    

    On other page where you want to show it you just reload it from Session

      Dim NewName = Session("adminname")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating login pages using asp.net with code behind in vb.net, I am
I'm a newbie to Asp.net,learning from the Apress's Begining Asp.net...book.While very curious to see
Newbie question. I’m writing an ASP.Net MVC app in VB.Net and have been using
I am a newbie and developing a website using ASP .Net 2.0 with C#
When accessing a form or query string value from code-behind in ASP.NET, what are
This is a very newbie kind of ASP.NET question: I simply don't know and
I am a newbie in using asp.net, I have a problem on how to
I am a newbie and just started learning the asp.net mvc, as I was
I'm newbie in ASP.NET I have a page to show a thread content, it
I am newbie at using DataSet. I am writing a program with VB.NET, there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.