Site Search:
Sign in | Join | Help
4Penny.net

ComponentArt

Using resuable content with a ComponentArt Dialog

I recently wrote in to ComponentArt support on this subject, here is the email thread.  

Sirs:
I'd like to be able to somehow templage the Dialog control so that I didnt have so much text on my .aspx page.

In other words, I'd like to replace everything in the <header> and <footer> areas and somehow populate them from a class.

Is that at all possible?

something like:

Dialog1.header.innerhtml = "<table>...</table>"

 

Steve,

The easiest way to do this would be to load controls into the Content in code behind by using:

Dialog1.Header.Controls.Add(Page.LoadControl("Head1.ascx"));
Dialog1.Content.Controls.Add(Page.LoadControl("Page1.ascx"));
Dialog1.Footer.Controls.Add(Page.LoadControl("Foot1.ascx"));

Just leave your sections empty in the dialog.

<Header></Header>
<Content></Content>
<Footer></Footer>

Hope this helps.

 

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.