473,463 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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?

Aug 22 '07 #1
1 1158
Look at the HTML for your form, specifically the <formtag. 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?
Aug 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: V | last post by:
I have found that when I have a composite control that uses the CreateChildControls method, on a regular page load, Page_Load executes before CreateChildControls, but on a postback it is the...
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
4
by: Mervin Williams | last post by:
Postbacks cause a webform to re-display the page at the top. Well, I have a fairly long form and would like the page display to be re-positioned where the user clicked the button that caused the...
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to...
4
by: Jeremy | last post by:
I have an ASPX page with a bunch of System.Web.UI.WebControls.Button controls on it. By default, clicking on any of these causes a Postback. I'd like to have it so that for a couple of these...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
7
by: Anand | last post by:
Hi All, The postback on my desktop stopped working. I am trying to run the webapplication locally on my desktop and the Postback on my home page won't trigger on any of my dropdown selections. The...
6
by: Bryan | last post by:
I've got an ASP.NET application running that has a non-visual user interface (it's a voice app using VXML.) The voice client understands cookies and when it requests and aspx page, what actually...
3
by: Chad Grooms, MCSD | last post by:
Here's an issue I haven't seen before now, and I am wondering if anyone else has experienced this... I have an web application (asp.net,vb) that has worked fine for quite a while. Now, For some...
1
by: Jason | last post by:
I have a webpage that I've wrapped in an Atlas UpdatePanel. This page contains four textboxes, each with AutoPostBack set to true. The problem comes when someone edits the first box and tabs to...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.