Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 August 23rd, 2004, 01:01 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default Help with Button click

Hi Friends

I am new to this language. I have made a login form which has 2 text boxes for username and password and a submit button so that if the username/password are correct, user is redirected to a new webpage.

However, if the password or username is incorrect, I have displayed a message box using button1.attributes.add

But the problem is when the first time the button is clicked (when the username pwd is invalid), not message box is displayed. However, if I click the second time Message box is displayed.

PROBLEM IS FIRST TIME THE MESSAGE BOX DOES NOT APPEAR.

Thanks
Mike

__________________
Regards
Mike
 
Old August 23rd, 2004, 08:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Well, the code was added for a button click, which would make sense. When the user clicks the button to login, if the credentials are bad, do:

Page.RegisterStartupScript("error", "alert('Credentials bad');")

Brian
 
Old August 26th, 2004, 12:04 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Brian

Thanks for the reply, but I couldn't find the properly 'RegisterStartupScript'. When I use page. I don't get this in the list?????? Am I doing something wrong.

Thanks
Mike

 
Old August 26th, 2004, 07:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

If you have Hide Advanced Members (Tools > Options > Text Editor > <language of choice>) clicked, you won't see it.

If you do have it clicked, then if you type it in, it will show, but not until that.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to button click Y/N in an email and kenn_rosie VB.NET 2002/2003 Basics 0 March 2nd, 2006 07:36 PM
Button Click ~Bean~ ASP.NET 1.0 and 1.1 Basics 2 September 27th, 2005 09:32 AM
Enter key vs Click Button akibaMaila VB.NET 2002/2003 Basics 1 January 14th, 2005 12:49 PM
Login Click Button mrideout BOOK: Beginning ASP.NET 1.0 6 August 12th, 2004 10:11 AM
Print on Button Click mahulda ASP.NET 1.0 and 1.1 Basics 2 August 5th, 2004 02:50 PM





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