Custom control design time rendering

Posted on 2005-05-10
Last Modified: 2010-04-07

Is there a way to show something at design time and another thing when the web page is actualy showed.
I have built a custom web control with a built in javascript pull down menu, it's working well but since the javascript is generated in the "render" event
nothing is showing at design time. What I'd like to do is to show a square with a label marking the position of the menu in design time but generating the real menu when the control is used in a page.
Is there a event or a condition occuring only in design time??


Question by:hqdev
    LVL 9

    Accepted Solution

    Ah, this is a fun one.  What you'll have to do is create a ControlDesigner class for your control and override the GetDesignTimeHtml() method.  

    Check out the following link:
    LVL 9

    Expert Comment


    Author Comment

    Great BurntSky! Thats exactly what I was looking for!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now