F
felixch
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
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