Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Setting Default button

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-03-15 : 11:19:19
I have created a user control using ASP.NET 1.1 to allow users to login to my SQL server. The control works well apart from one minor but very irritating detail and I was hoping someone here may be able to help.

The control consists of a series of textboxes etc and a single button. What ever I do I always get the same effect.

What I want is to be able to press Enter when I have typed in my user name and password and for the login button to act. whatever I try all I get is the page with nothing in the text boxes. I have tried many variations of Page.RegisterHiddenField("__EVENTTARGET",... to no avail, I have put it in the control, in the page, I have changed the button to an HTML button and still nothing works,

Does anyone have any clues please

thanks

steve

-----------

Don't worry head. The computer will do all the thinking from now on.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-03-15 : 11:42:48
http://weblogs.asp.net/jeff/archive/2005/07/26/420618.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-03-16 : 04:29:02
Thanks Spirit I'll take a good look at that. I must say in general that there seem to be so many slightly different ways of doing this that it is very confusing trying to do something that should be so simple (shouldn't it?). Is this easier in .NET 2 or 3?

thanks

steve

-----------

Don't worry head. The computer will do all the thinking from now on.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-03-16 : 05:50:31
it is:
http://weblogs.sqlteam.com/mladenp/archive/2006/09/10/11838.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-03-16 : 07:10:09
Maybe the answer is an upgrade which is something I have been seriously considering anyway.

I'm afraid the suggestion you linked to didn't work for me. I think the problem is that the page this control is used on has another control above it which has the top of a page stuff for my app. This also has a button and that is the one that is being clicked rather than my login button as far as I can tell.

What is irritating me is that it seems to work ok elsewhere that I have the page heading control

Thanks anyway Spirit

steve

-----------

Don't worry head. The computer will do all the thinking from now on.
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-03-16 : 07:34:17
AARGH - I don't believe it!! I've changed the button to a hyperlink button and all of a sudden it seems to work. Apart from that I now have no idea what I have done differently. This sums up for me what I love about ASP.NET </sarcasm> one minute it don't work the next it does!!

steve

-----------

Don't worry head. The computer will do all the thinking from now on.
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-03-16 : 07:34:59
No I lied, it's stopped again now!

-----------

Don't worry head. The computer will do all the thinking from now on.
Go to Top of Page
   

- Advertisement -