Non Scrolling WebControl

Is it possible to have a webcontrol that does not move as the page is scrolled?

If so how?

Jim, you are in luck.

Put this in a module :

Public Sub freezeControl(extends lecontrol as WebControl, frozen as boolean) dim freezer as string if frozen then freezer = "fixed" else freezer = "absolute" end if dim js as string js = js + "var thatcontrol = document.getElementById('"+lecontrol.controlID+"');" js = js + " = '"+freezer+"';" lecontrol.ExecuteJavaScript(js) End Sub

Then call it like so


and the button won’t scroll anymore

To release it, pass false to the method.

Yes we are! Thanks.