Hello everyone, I'm a frequent reader of a lot of software dev forums on the interent when I go searching for solutions for problems. But it seems like I always keep coming back to this one because it's correct.

But to start off, I made a little app that has a login form on it(username and password textbox, the general stuff). I'm also linking to the database which has theuser information in it. Upon searching the database and seeing if the user's info is there it moves to the next page, I have that all done.

But I would like to know if there is some way to welcome the user by name on the next page? All the links I click to keep saying ASP.NET, which is not what I need. Is there a way to do this?

EXAMPLE:
username: john
password: jj123

NEXT PAGE says something like: Welcome John on it. . .

Thanks guys!

not sure what you mean with "pages" if its not ASP.NET
but anyway you can do it on two different ways...

1. once the user logged in you can save the user name in My.Settings
go to your Project properties - settings
create a setting "Username"
in your application save the username like My.Settings.Username = Textbox1.Text

2. you create a global variable (if you only wanna hold the username) or a structure (if you wanna hold more information about the user)
create a module (if you havent already one)
declare the variable
Friend Username as string
assign it on login
Username = textbox1.Text

In VB.Net i think it is easy in second form i did this :

Public Class Form2
    Public username As String

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = "Welcome MR. " & username

    End Sub
End Class

And in first form , login form when the user clicked the button , i added this :

Form2.username = TextBox1.Text
                Form2.Show()
                Me.Hide()

Thanks so much Vineeth, I did it your way but slightly different. It's all working now, thanks again!

SOLVED.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.