A
active
Because I received much help from this NG I have this in the .master.vb
file:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Image1.Attributes.Add("onload", "resizeImg('" + Image1.ClientID + "')")
End Sub
and define the Script for resizeImg in the .Master file.
This because I want resizeImg to run on the client side.
To convince myself it is running on the client side I put an error into the
script so the IE loading would break if it runs the script while loading. It
does. I believe that means it is indeed running client side. Be nicer if I
could do a QuickWatch at the break that would prove it was running client
side.
0) Know what I could watch that changes at client side?
My other questions are:
1) Does all script run client side.
2) If not, how is it controlled.
3) Are Attributes.Add statements only put into the Me.Load event
4) Me refers to what - the Document, the Page, ...
thanks
It was also suggested in this NG that I look into RegisterStartupScript as
an alternate way of running script client side, which I plan to look into
now.
file:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Image1.Attributes.Add("onload", "resizeImg('" + Image1.ClientID + "')")
End Sub
and define the Script for resizeImg in the .Master file.
This because I want resizeImg to run on the client side.
To convince myself it is running on the client side I put an error into the
script so the IE loading would break if it runs the script while loading. It
does. I believe that means it is indeed running client side. Be nicer if I
could do a QuickWatch at the break that would prove it was running client
side.
0) Know what I could watch that changes at client side?
My other questions are:
1) Does all script run client side.
2) If not, how is it controlled.
3) Are Attributes.Add statements only put into the Me.Load event
4) Me refers to what - the Document, the Page, ...
thanks
It was also suggested in this NG that I look into RegisterStartupScript as
an alternate way of running script client side, which I plan to look into
now.