Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > extremely slow when adding onclick event inside Repeater

Thread Tools

extremely slow when adding onclick event inside Repeater
Posts: n/a
Hi all,

I tried to add an OnClick event to a LinkButton by using
Attribute.sAdd, which resides in a Repeater and the Repeater is bind
with a DataTable with around 2000 records. If I try to run the page in
debug mode it takes more than 1 mins to load and consumes alot of
memory. If I remove the line: h.Attributes.Add("OnClick",test()), it
only takes a few seconds to load. Furthurmore, If I run the page
without debug mode, it also takes a few seconds to load. Can anyone
explain to me why? And how can I get the page to run faster in debug

Here is the code snippet:

protected void Repeater1_ItemCreated(object sender,
RepeaterItemEventArgs e)
LinkButton h = (LinkButton)((RepeaterItem)e.Item).Controls[1];
h.Attributes.Add("OnClick", "test1()");


Reply With Quote

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
repeater inside a repeater problem. uncensored ASP .Net 0 10-25-2006 06:10 PM
Repeater inside a Repeater Microsoft ASP .Net Web Controls 0 08-21-2006 09:13 AM
Repeater inside a ASP .Net 1 08-10-2005 01:58 PM
Extremely Slow LAN transfers on WINXP Pro. Ed. RK Wireless Networking 2 07-07-2005 02:56 AM
ASP.NET/IIS on XP Pro Extremely SLOW B Dunwoodie ASP .Net 0 04-26-2004 11:03 AM