X
xanthviper
Hey there,
I'm kind of stumped on this and hopefully someone can guide me in the
right direction.
I have a webform that I am developing in C# using ASP.NET 2.0. On the
page_load, I am getting some information from a database query telling
me how many images I need to show on the page. Since this count can be
dynamic, I am doing the following code to add images to a PLACEHOLDER
already on the ASPX file:
Image imgPageThumb = new Image();
imgPageThumb.ImageUrl = ModuleSettings.DocThumbWebURL +
strPageFileName;
imgPageThumb.Height = Unit.Pixel(85);
imgPageThumb.BorderWidth = 3;
plcPageThumbs.Controls.Add(imgPageThumb);
This works pretty well and everything is good. The next thing I am
trying to do is add a javascript command to either ONMOUSEOVER or
ONCLICK TO execute some javascript that will change my image for me.
Basically a rollover if you will.
"movepic('imgDocThumb', '" + ModuleSettings.DocThumbWebURL +
strPageFileName + "')";
thats where the problem comes in, I have no clue how to add it to any
of the clientside events.
I have tried doing this is an actual IMAGE button. This works great,
however if a client CLICKS on the image button, it will perform the
clientside ONCLICK, but then also perform a post-back which is
something I don't want to do.
Hopefully someone has an idea on this and I would really appreciate any
help you may have.
TIA
I'm kind of stumped on this and hopefully someone can guide me in the
right direction.
I have a webform that I am developing in C# using ASP.NET 2.0. On the
page_load, I am getting some information from a database query telling
me how many images I need to show on the page. Since this count can be
dynamic, I am doing the following code to add images to a PLACEHOLDER
already on the ASPX file:
Image imgPageThumb = new Image();
imgPageThumb.ImageUrl = ModuleSettings.DocThumbWebURL +
strPageFileName;
imgPageThumb.Height = Unit.Pixel(85);
imgPageThumb.BorderWidth = 3;
plcPageThumbs.Controls.Add(imgPageThumb);
This works pretty well and everything is good. The next thing I am
trying to do is add a javascript command to either ONMOUSEOVER or
ONCLICK TO execute some javascript that will change my image for me.
Basically a rollover if you will.
"movepic('imgDocThumb', '" + ModuleSettings.DocThumbWebURL +
strPageFileName + "')";
thats where the problem comes in, I have no clue how to add it to any
of the clientside events.
I have tried doing this is an actual IMAGE button. This works great,
however if a client CLICKS on the image button, it will perform the
clientside ONCLICK, but then also perform a post-back which is
something I don't want to do.
Hopefully someone has an idea on this and I would really appreciate any
help you may have.
TIA