Complex Custom Control RRS feed

  • Question

  • User-1800386268 posted

    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!

    Friday, January 20, 2012 10:25 AM


All replies

  • User-1226263862 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 20, 2012 2:39 PM
  • User-974944834 posted

    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.

    Friday, January 20, 2012 4:58 PM
  • User3866881 posted

    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

    Saturday, January 21, 2012 8:42 PM
  • User-1800386268 posted

    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.

    Monday, January 23, 2012 6:39 AM
  • User-1226263862 posted

    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.

    Monday, January 23, 2012 10:25 AM