extremely slow when adding onclick event inside Repeater

Discussion in 'ASP .Net' started by felixch@gmail.com, Feb 28, 2007.

  1. Guest

    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
    mode?

    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()");
    }

    Thanks,
    Felix
     
    , Feb 28, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. B Dunwoodie

    ASP.NET/IIS on XP Pro Extremely SLOW

    B Dunwoodie, Apr 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    492
    B Dunwoodie
    Apr 26, 2004
  2. Natan

    Extremely slow ASP.NET

    Natan, Dec 11, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,292
    =?ISO-8859-1?Q?Marcelo_Hern=E1n_Ruiz?=
    Dec 11, 2004
  3. Rabbit

    Extremely Slow Performance

    Rabbit, Feb 6, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    746
    Rabbit
    Feb 7, 2006
  4. =?Utf-8?B?RENDLTcwMA==?=

    IDE/Debugger Extremely Slow

    =?Utf-8?B?RENDLTcwMA==?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    1,267
    DCC700
    Apr 17, 2006
  5. Timo Nentwig

    linux: eclipse extremely slow

    Timo Nentwig, Jul 24, 2003, in forum: Java
    Replies:
    0
    Views:
    698
    Timo Nentwig
    Jul 24, 2003
Loading...

Share This Page