GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-May-2006, 08:07
bluebeta bluebeta is offline
New Member
 
Join Date: Apr 2006
Posts: 11
bluebeta is on a distinguished road

Server Button Control execute twice


Hi,

I am new to ASP .NET, I am using visual studio 2005 and ASP .NET 2.0.When I do a simple practical i find a strange problem on server button control.

I have a web form with a few text boxes and a submit button. When I click the submit button, the data in the text box will insert into database. but when I click the button I found that the same record is inserted twice. That means a single click on the button cause the button event execute twice.

Any idea? Thanks in advance.

Best Regards.
  #2  
Old 19-May-2006, 03:25
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: Server Button Control execute twice


Maybe it is you who insert it twice, put some breakpoints and debug the program .
  #3  
Old 12-Jun-2006, 10:25
Sirk Sirk is offline
New Member
 
Join Date: Jun 2006
Posts: 12
Sirk will become famous soon enough

Re: Server Button Control execute twice


This has to do with the way the event model works in .NET.

For the long answer read this: (scroll to the section: Event Delegates in Web Forms Pages)
//msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconWebFormsEventModel.asp
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Group Round buttons (radio buttons) toaster FLTK Forum 1 03-Jan-2006 07:57
Microsoft SQL Server :: SQL Server message 241, state 1, severity 16 lyuboe MySQL / PHP Forum 0 11-May-2005 05:31
Help! Some basal questions about MFC xutingnjupt MS Visual C++ / MFC Forum 1 05-Dec-2004 04:38
How to set the control button in the pushed mode? mithila MS Visual C++ / MFC Forum 1 27-Sep-2004 07:32
· Windows 2003 Server Reseller Special: Unlimited Domains/2 GB Space/for $19.99 contactsonia Web Hosting Advertisements & Offers 0 09-Jan-2004 06:46

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:27.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.