Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2003, 05:29 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable Form Elements

Guys

I'm adding various layers of security to a web site and need a little guidance. I've set up some routines that check login attempts, freezing a user if thay attempt to login more than x times.

What I would like to do is disable the form submit button too.

Has anyone implemented something similar? I would prefer not to use Javascript.

TIA

Joe
 
Old October 28th, 2003, 10:41 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Presumably you are posting back for each login attempt... so you should be able to just sent button.Enabled = False once they have reached their login limit.

The WebControl base class has the Enabled property so all controls derived from that will as well. They each behave differently, but they are all "Disable-able".

Peter
 
Old October 31st, 2003, 08:11 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cheers Peter

':: Diable Textboxes
txtUserName.Enabled = False
txtPassword.Enabled = False
':: Disable Submit button
btnLogin.Enabled = False

Sorted it

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable form design ? sms Access 2 May 19th, 2008 02:06 AM
Enable/Disable Form Elements Question kwilliams Javascript 4 February 28th, 2006 11:28 AM
disable input elements without using "disabled" pollockc HTML Code Clinic 5 January 24th, 2006 10:51 AM
Disable/Enable elements ldoodle Javascript How-To 3 June 7th, 2005 05:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.