Please Help! Dynamically created login feature - multiple values for CommandArgument

  • Thread starter Kevin Bell via .NET 247
  • Start date
K

Kevin Bell via .NET 247

Hi All!

I am trying to create a simple login feature for my webpage dynamically using VB.NET/ASP.NET. There are two textfields, userName and userPass, and a button, btnLogin.

I want to use addHandler to set btnLogin's Command to a sub that will read in the values from userName and userPass then do the authentication.

The problem I'm having is that I can't pass two values through btnLogin.commandargument. Even if I could, is it possible to pass the values FROM the two textfields instead of just a static "example" string value?

I need to create this login feature with the dynamic controls, but if anybody can suggest a better way, I'd really appreciate it!
 
K

Karl

Kevin,
I'd like to see the code you currently have, but you should be doing
something like this:

page load
AddHandler btnLogin.Click, AddressOf btnLogin_Click
end

btnLogin_click
dim username as string = userName.Text
dim password as string = userPass.Text
end

not sure why you need to pass two values in the command argument? Just
access the username and userpass controls in your click event.

Karl

Kevin Bell via .NET 247 said:
Hi All!

I am trying to create a simple login feature for my webpage dynamically
using VB.NET/ASP.NET. There are two textfields, userName and userPass, and
a button, btnLogin.
I want to use addHandler to set btnLogin's Command to a sub that will read
in the values from userName and userPass then do the authentication.
The problem I'm having is that I can't pass two values through
btnLogin.commandargument. Even if I could, is it possible to pass the
values FROM the two textfields instead of just a static "example" string
value?
I need to create this login feature with the dynamic controls, but if
anybody can suggest a better way, I'd really appreciate it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
Martindap

Latest Threads

Top