Slow loading of page and OnClick not working...

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

Hi,

I've got two problems:

My datagrid is 35 columns wide and 26 rows tall. Columns 4 to 35 are filled
with ImageButtons, created during runtime and each one with it's own name.
During the creating of these buttons I do the following:

img.Attributes.Add("OnClick", "ButtonClicked")

Without this, the page is created in just a few seconds, with this it takes
about 14 seconds to show the grid.

How can I make this faster?

My second problem is related to the same line.
I get a runtime javascript error telling me "ButtonClicked" is not defined,
even though I have:

Sub ButtonClicked(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs)
Label6.Text = sender.id
End Sub

What should I do about this?

rg,
Eric
 
Back
Top