On Oct 12, 12:10 pm, jonny <nelso...@hotmail.comwrote:
On Oct 12, 11:06 am, gnewsgroup <gnewsgr...@gmail.comwrote:
On Oct 12, 11:59 am, jonny <nelso...@hotmail.comwrote:
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;
}- Hide quoted text -
- Show quoted text -
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.