|
-
May 21st, 2004, 11:52 AM
#1
Thread Starter
Frenzied Member
Custom Rollover Image Control
I'm creating a custom rollover image control, which inherits from WebControl. Everything works great except when I initially drop the control on the page and set the BaseImage property, it doesn't fill in the imagebox with the image I have specified.
If you drop a .NET Image control on a page, initially the image doesn't appear, until you set the ImageUrl property, then the image appears.
How can I refresh the control in the IDE to show the image that was set? Basically, duplicate the functionality of having the image appear when the property is set.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
May 21st, 2004, 04:36 PM
#2
Thread Starter
Frenzied Member
hmmm....okay...
Does anyone know how to refresh or repaint or rerender a control in the IDE after a property has changed?
I have seen for windows forms that you can call the Invalidate method within the property to have it repaint the control, but that method doesn't exist in ASP.NET.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
May 21st, 2004, 09:46 PM
#3
Frenzied Member
Do you know about designers?
If so look at the ControlDesigner's RaiseComponentChanged and RaiseComponentChanging members. Also, check out GetDesignTimeHtml, GetErrorDesignTimeHtml, and GetEmptyDesignTimeHtml.
I don't have a good working example to post. Sorry.
Magiaus
If I helped give me some points.
-
May 21st, 2004, 09:54 PM
#4
Frenzied Member
Oh!
Be sure to use some sort of javescript image cache or you'll get a nasty lag effect. I have an ImageList for ASP.Net but I haven't finished the designer yet. It's nice I have an interface that add ImageList To a WebControl and the list is basicly a strong typed collection. It renders a javascript image array i.e. imgs[x] - new Image('path'); the Collection just maps the exact same index and .... blah..blah.. not done...
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|