Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > User name and password to activate buttons and hyperlinks on website

Reply
Thread Tools

User name and password to activate buttons and hyperlinks on website

 
 
jonny
Guest
Posts: n/a
 
      10-12-2007
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.

 
Reply With Quote
 
 
 
 
gnewsgroup
Guest
Posts: n/a
 
      10-12-2007
On Oct 12, 11:59 am, jonny <(E-Mail Removed)> wrote:
> 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;
}

 
Reply With Quote
 
 
 
 
jonny
Guest
Posts: n/a
 
      10-12-2007
On Oct 12, 11:06 am, gnewsgroup <(E-Mail Removed)> wrote:
> On Oct 12, 11:59 am, jonny <(E-Mail Removed)> wrote:
>
> > 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)

 
Reply With Quote
 
gnewsgroup
Guest
Posts: n/a
 
      10-12-2007
On Oct 12, 12:10 pm, jonny <(E-Mail Removed)> wrote:
> On Oct 12, 11:06 am, gnewsgroup <(E-Mail Removed)> wrote:
>
>
>
> > On Oct 12, 11:59 am, jonny <(E-Mail Removed)> wrote:

>
> > > 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.

 
Reply With Quote
 
gnewsgroup
Guest
Posts: n/a
 
      10-12-2007
On Oct 12, 12:10 pm, jonny <(E-Mail Removed)> wrote:
> On Oct 12, 11:06 am, gnewsgroup <(E-Mail Removed)> wrote:
>
>
>
> > On Oct 12, 11:59 am, jonny <(E-Mail Removed)> wrote:

>
> > > 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)


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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what does this error mean `activate': can't activate activesupport (=3.0.1, runtime) for ["activerecord-3.0.1"] Junkone Ruby 2 10-27-2010 09:13 AM
If textarea is NOT empty, activate 2 radio buttons Syswatch Javascript 3 12-09-2006 02:52 PM
dynamically add hyperlinks and buttons to a datagrid Richard Jonker ASP .Net Datagrid Control 2 10-03-2006 05:48 AM
using hyperlinks as submit buttons Alexander Weiner HTML 13 07-02-2006 10:52 PM
Hyperlinks vs Buttons ? =?Utf-8?B?SXJmYW4gQWtyYW0=?= ASP .Net 5 02-13-2005 01:33 PM



Advertisments