Function executed twice

B

Bruno Alexandre

Hi guys,

from some time I have a problem in my ASPX pages (2.0)
when I drag a LinkButton or Button or Whatever and then I go to server
propreties and click twice on the event onClick

the Visual Studio 2005 places ButtonName_Click inside the button tag and in
the code behing file gives-me

ButtonName_CLick( bla bla ) Handles ButtonName.Click

if inside this event I just write something to the database (even a simple
response.write("HEllO<hr/>")) and then I execute the page, and click in the
link/button I get the page to write 2 times that phrase !!!

if I delete the event from the button FINE
if I delete the Handles ButtonName.Click FINE


but by default VS2k5 add this two and I need to delete one everytime before
saving the file, cause if I want to navigate from design to code in
code-behid I usually click twice in the link/button and that will ADD the
event onCLick in the tag and the Handles in the code behind...

Does anyone cross with this error? what do I have to do do have only one
single event even with both events on the TAG and the CODE-BEHIND ?

my header page always starts with:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default"
LCID="1030" Strict="true" Explicit="true" %>

any ideas?
--

Bruno Alexandre
Stroby, Danmark

"a Portuguese in Denmark"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top