DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 22 Aug 2007 03:18:24 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    jediknight
          2    Steve


Postback problems   
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?
Date:Wed, 22 Aug 2007 03:18:24 -0700   Author:  

Re: Postback problems   
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


jediknight wrote:

> 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?
> 
Date:Wed, 22 Aug 2007 08:11:05 -0400   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us