Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Events problem...

Reply
Thread Tools

Events problem...

 
 
Lupin3d
Guest
Posts: n/a
 
      07-09-2003
Hi...
i have an aspx page(home.aspx) that contains an ascx usercontrol
(chrt.ascx).
In home.aspx there is a button with his event...
In the ascx page i want to create an event for that button.... i do in
this way...

(home.aspx)
private void InitializeComponent()
{
this.button1.click += new System.EventHandler(this.button1_Click);
}

public static event EventHandler butt_click;

private void button1_Click(object sender, System.EventArgs e)
{
butt_click(this,e);
}

(chrt.ascx)
private void InitializeComponent()
{
home.butt_click += new System.EventHandler(this.butt1_click);
}

private void butt1_click(object sender, System.EventArgs e)
{
...... // code that calls a stored procedure
}

But....if i open Sql Profiler i see that when i click this button once
the stored procedure is called once...if i click another time the
stored procedure is called twice...and so on...after an intense use of
the site (the button was clicked ten times) the site become very slow
due the many calling to the stored procedure...

can u help in my trouble?

10nx a lot.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime events that generate other controls and events newbye ASP .Net 0 07-06-2006 06:27 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
order of events - dynamic checkbox events =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?= ASP .Net 0 08-17-2005 10:36 PM
Re: passing variables between web page events & httpmodules events Alvin Bruney ASP .Net 1 11-24-2003 04:14 PM
Passing Variables between Web Page Events and HttpModule Events shiv ASP .Net 0 11-21-2003 04:29 PM



Advertisments