Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Postback problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jediknight - 22 Aug 2007 11:18 GMT
Hi

I am very new to asp.net 2.0 as I come from a windows development
background.

I have developed a small user control which has a couple of
textfields. One of the textfield requires that when then return key be
pressed, some validation and database queries are made. For this I
have added the text_changed handler. This works fine. I have also
added a delegate and raised an event when the return key is pressed.

In my webform, I have added the user web control to a panel which also
has some other controls and added the handler to my custom event.

The webform also has a Save button.

The problem I am having is that, when ever I hit the return key in my
user control, the event is raised correctly but then the Save_Click
event is called.

Can I stop this Save_Click event from occuring?
Steve - 22 Aug 2007 13:11 GMT
Look at the HTML for your form, specifically the <form> tag. If you have
a "defaultbutton" attribute set to your save button, this behavior can
happen. If so, just remove the defaultbutton attribute.

Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA

> Hi
>
[quoted text clipped - 17 lines]
>
> Can I stop this Save_Click event from occuring?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.