User name and password to activate buttons and hyperlinks on website

  • Thread starter Thread starter jonny
  • Start date Start date
J

jonny

I would like to add a password and user name to my website. If the
username and password is correct than activate the hyperlinks and
buttons.

Could you please share some code how how to achieve this? I have
several buttons and links on my home page and do not want it to be
active until the user enters the correct password.

Using ASP.NET with Visual Studio 2005.
 
I would like to add a password and user name to my website. If the
username and password is correct than activate the hyperlinks and
buttons.

Could you please share some code how how to achieve this? I have
several buttons and links on my home page and do not want it to be
active until the user enters the correct password.

Using ASP.NET with Visual Studio 2005.

Make your buttons disabled by default, and enable it only when the
username/password are correct.

if (isValidUser)
{
myButton.Enabled = true;
}
else
{
myButton.Enabled = false;
}
 
Make your buttons disabled by default, and enable it only when the
username/password are correct.

if (isValidUser)
{
myButton.Enabled = true;}

else
{
myButton.Enabled = false;



}- Hide quoted text -

- Show quoted text -

Is there a way to disable all the website links until (isValidUser).
(I am using VB.NET)
 
Is there a way to disable all the website links until (isValidUser).
(I am using VB.NET)

Yes, you can. If you don't wanna manually disable each link through
hard-code, you will have to recursively iterate through all controls
in your page, and disable your links.

Search recursive find controls, and you'll get a bunch.
 
Is there a way to disable all the website links until (isValidUser).
(I am using VB.NET)

By the way, I just notice that you want to disable all website
(instead of a single page) links until authentication passes. I
understand that each application is different from the other, but why
do you need to do so?
 
Back
Top