Hey guys, so i am trying to design a new control for use with my web app, but Im not quite sure where to begin...
I need a new button, that should have text and below that, 5 .gif thumbnails.
I´ve read a bit about this, and I am guessing I´d have to make a composite component, utilizing a button, its text, and the 5 images. My question is, is it possible to do it like that? meaning embed the 5 images? Or how can i alter the HTML that is generated?
Or would it be better if i use a panel, add a label and the 5 images, and make the whole panel clickable to work as a button?
Note that the 5 image thumbnails need to be dynamically changable.
Here you can create a custom server control
http://forums.asp.net/t/1345043.aspx/1. If you plan to use it in more than one applicatoin, you should seriousl think about using the custom server control although it is harder to do it, it is worth the work in the long run. The other option would be
to create a custom User Control using an ascx control in your web app and exposing some public properties to set the image URL's. Here is a post on creating a custom user control:
http://forums.asp.net/t/1759164.aspx/1?RadioButtonList+with+extra+controls
Remember to mark as answer if this post answered or solved your problem.
Marked as answer by Pizana on Feb 15, 2012 03:13 PM
You can find an ActiveX control and embed it into your web application. Are the 5 images you mentioned stored on your web server and you need to load them to your web page accordingly? If yes, the one you can try is
Dynamic Web TWAIN, a control developed by Dynamsoft I'm working for. It allows you to scan or load images from your local machine, web server or database and edit them if needed.
If you are not very familiar with the design in the pure Server-side control,I suggest you trying to create an ascx control and then convert it to a publishable control for server side。Because in the development of ascx control,it will be easy and convenient
to drag and drop several controls onto the UI……
What i´d really like to do is perhaps modify an Imagebutton or Linkbutton, so that I am able to insert the 5 images mentioned, but still keep functionality of button.
As stated before, it has to be a server control and not a user control.
Do all 5 images have to have the same event fired when clicked or would they be 5 different events? Your answer will depend on how it can be delveloped.
Remember to mark as answer if this post answered or solved your problem.
Pizana
Member
56 Points
71 Posts
Complex Custom Control
Jan 20, 2012 02:25 PM|LINK
Hey guys, so i am trying to design a new control for use with my web app, but Im not quite sure where to begin...
I need a new button, that should have text and below that, 5 .gif thumbnails.
I´ve read a bit about this, and I am guessing I´d have to make a composite component, utilizing a button, its text, and the 5 images. My question is, is it possible to do it like that? meaning embed the 5 images? Or how can i alter the HTML that is generated?
Or would it be better if i use a panel, add a label and the 5 images, and make the whole panel clickable to work as a button?
Note that the 5 image thumbnails need to be dynamically changable.
Thanks for your help!
Any links and help would be great!
b471code3
Star
13877 Points
2598 Posts
Re: Complex Custom Control
Jan 20, 2012 06:39 PM|LINK
Here you can create a custom server control http://forums.asp.net/t/1345043.aspx/1. If you plan to use it in more than one applicatoin, you should seriousl think about using the custom server control although it is harder to do it, it is worth the work in the long run. The other option would be to create a custom User Control using an ascx control in your web app and exposing some public properties to set the image URL's. Here is a post on creating a custom user control: http://forums.asp.net/t/1759164.aspx/1?RadioButtonList+with+extra+controls
Adam-asp
Member
192 Points
47 Posts
Re: Complex Custom Control
Jan 20, 2012 08:58 PM|LINK
You can find an ActiveX control and embed it into your web application. Are the 5 images you mentioned stored on your web server and you need to load them to your web page accordingly? If yes, the one you can try is Dynamic Web TWAIN, a control developed by Dynamsoft I'm working for. It allows you to scan or load images from your local machine, web server or database and edit them if needed.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Complex Custom Control
Jan 22, 2012 12:42 AM|LINK
Hello Pizana:)
If you are not very familiar with the design in the pure Server-side control,I suggest you trying to create an ascx control and then convert it to a publishable control for server side。Because in the development of ascx control,it will be easy and convenient to drag and drop several controls onto the UI……
For more about this,see:Convert an ascx control to distributed one。
Pizana
Member
56 Points
71 Posts
Re: Complex Custom Control
Jan 23, 2012 10:39 AM|LINK
Thanks for all the replies!
What i´d really like to do is perhaps modify an Imagebutton or Linkbutton, so that I am able to insert the 5 images mentioned, but still keep functionality of button.
As stated before, it has to be a server control and not a user control.
b471code3
Star
13877 Points
2598 Posts
Re: Complex Custom Control
Jan 23, 2012 02:25 PM|LINK
Do all 5 images have to have the same event fired when clicked or would they be 5 different events? Your answer will depend on how it can be delveloped.