Welcome Guest Search | Active Topics | Sign In | Register

Dialog ContentTemplate Options
David Porter
Posted: Tuesday, November 6, 2007 10:59:37 PM
Rank: Advanced Member
Groups: Member

Joined: 6/14/2007
Posts: 36
Hi There,

Is there any way to prevent controls within the dialog's contentTemplate from changing their ids and names?

I would like to reference from my code a control by it's original id.

E.g. if my ContentTemplate contained a label called "TextBox1" I could just write:

Code: Visual Basic.NET
TextBox1.Text="Hello World"



I appreciate I could do something like the following:

Code: Visual Basic.NET
Dim MyTextBox As TextBox = Dialog1.ContentContainer.FindControl("TextBox1")


But I would like to implement the Dialog into some existing legacy code which relies on the controls being accessible at the page level, and also their values being accessable through "Request.Form" without any renaming.


Is it possible that this control could be set up to work either way? E.g. the way ASP AJAX's UpdatePanel ContentTemplate does not modify IDs.


Thanks in advance,
Dave
eo_support
Posted: Wednesday, November 7, 2007 4:59:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Dave,

Unfortunately that's not possible in our current release. Dialog's ContentTemplate is implemented as a naming container so ASP.NET doesn't regard them as direct child element of the form. We will look into it and see if its possible to make work the way you described.

Thanks
David Porter
Posted: Wednesday, November 7, 2007 3:34:55 PM
Rank: Advanced Member
Groups: Member

Joined: 6/14/2007
Posts: 36
Thanks for the quick response,

Please let me know if this feature is ever implemented, as it will be a great help. :)

Thanks again,
Dave


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.