473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Force new call to GetDesignTimeHtml

I have a custom CompositeControl (FooControl) whose child controls are
determined at runtime. I created a custom CompositeControlDesigner
(FooControlDesigner) which displays the control at design time. In
GetDesignTimeHtml, I call a method on FooControl to create some "dummy"
child controls to simulate the child controls that would be created at
runtime, and then call its RenderControl() method, passing an HtmlWriter
wrapped around a StringWriter. I then use the contents of the
StringWriter as the return value of GetDesignTimeHtml.

This works perfectly as-is - my design time view looks just like the
runtime view (except it has dummy controls standing in for the controls
discovered at runtime).

Now I would like to give the user the ability to see an alternate view
at design time. By alternate view, I just mean it will use a different
set of dummy child controls. I've decided to implement this as a Smart
Tag on the designer. I've overridden the ActionLists property on
FooControlDesigner so that it adds DesignerActionPropertyItem menu item
that wraps a boolean property. The Smart Tag correctly renders as a
checkbox. When the user checks the checkbox, it should change the design
time view to use the "alternate" set of dummy controls. When they clear
the checkbox, it should change the design time view to use the default
set of dummy controls.

However, when I check or clear the checkbox on the designer, it has no
effect on the design view of my control. I've seen other posts that
mention clearing the Controls property of FooControl, or settings
ChildControlsCreated = false, but neither of those seem to have an
effect. None of them seem to trigger a new call to GetDesignTimeHtml
while the user is still in design view.

This is what I want to happen:

1) Check box on Smart Tag changed -> 2) calls property setter on
DesignerActionList derived class -> 3) calls property setter on
FooControlDesigner -> 4) changes internal state of designer and 5)
forces the designer surface (VS.NET) to call GetDesignTimeHtml again on
my designer so I can return the new HTML -> 6) users sees new view of
control on designer surface.

Steps 1-4 are working. What do I need to do to get steps 5 & 6 to work?
[Originally posted on at http://forums.asp.net/1157233/ShowPost.aspx but
I'm not sure how much attention that will get]
Jan 4 '06 #1
0 1273

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Charles Soto | last post by:
I've got a main loop script that calls two other scripts that do no user interaction. All they do is send a couple of mysql update statements. Then they use header() to call the main loop again. ...
1
by: BuddyWork | last post by:
Hello, I want to know how I can force a GC to run outside the application. For example. App1 which is where I want the GC to be collected. I don't want to run GC.Collect within this...
3
by: Arulraja | last post by:
Hello, I have created 2 custom server controls, The parent custom control contains multiple child custom controls. The Child control has a button on it. If I Click the button control, it...
5
by: annagel | last post by:
I am looking for a way to force a Tkinter window into focus on a system level. I know the force focus method should bring one window of my application into focus, but it seems I need to have some...
5
by: Dave Booker | last post by:
I am developing in VS2005, but I have some third-party DLL's that appear to only work correctly when compiled in VS2003. ("Incorrect" operation is defined as a busy-wait that kicks in on a message...
3
by: marklawford | last post by:
Connected to BD2 8.2 via JDBC, can we force an application off the database? We know we can use the snapshot functions to get a view over connected users, that works find through a standard SQL...
2
by: cottonj | last post by:
is there anyway to force an event, like mouseover? I have a page that loads, and due to some complex js code (not mine) it fails to write labels to tabs until the user does a mouseover on the...
6
by: bryanbabula | last post by:
I have a question about overriding i was wondering if anyone could help me with, or even suggesting a better/different way. I have no idea if this can even be done or not. I was wondering if there...
38
by: Boon | last post by:
Hello group, I've been toying with a simple sudoku solver. I meant for the code to be short and easy to understand. I figured "brute force is simple" -- who needs finesse, when you've got...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.