Welcome Guest Search | Active Topics | Sign In | Register

Any code samples for the dialog? Options
Sam
Posted: Saturday, July 25, 2009 2:01:38 PM
Rank: Newbie
Groups: Member

Joined: 7/25/2009
Posts: 1
Hi,

I'm interested in the dialog control. Are there any code samples?

Here's an example of what I want to do:

I want to be able to dynamically load user controls into a dialog modal box. All of the logic will be handled in code behind on the server side.

Does the dialog control give me a clean way to handle this i.e. being able to open/close the dialog from server side code, be able to place a PlaceHolder control in the dialog and dynamically putting content into it?

Thanks,

Sam
eo_support
Posted: Saturday, July 25, 2009 2:45:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Yes. You can do that. You will need to load your content into the dialog's ContentTemplate. The easiest way is to place a Panel inside the dialogs' ContentTemplate (right click the dialog, then select Edit Template -> ContentTemplate from the menu, then place a Panel control there). Once you have a Panel there, load whatever you would like to load into your Panel control and it no longer has anything to do with the dialog.

You can also find a set of basic dialog samples here:

http://demo.essentialobjects.com/Default.aspx?path=Dialog

You would call the dialog's Show method to open the dialog on the server side. You do not need to explicitly hide it from code behind. Every time the page posts back the dialog is automatically closed.

Hope this helps.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.