Re: HtmlPlaceHolder,how to get the html from this controls when Pu
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Re: HtmlPlaceHolder,how to get the html from this controls when Pu




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: HtmlPlaceHolder,how to get the html from this controls when Pu  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-18-04 10:50 PM

Hi Paulo,

as assumed.
You are not dealing with placeholders but with placeholder controls.
Please retrieve the actual placeholder object using the BouldPlaceholder
property of the placeholder control.

Means to get the placeholder use this code:

Dim content As String = CType(DivPlaceHolder.BoundPlaceholder,
HtmlPlaceholder).Html

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Paulo Rosa" <PauloRosa@discussions.microsoft.com> wrote in message
news:5AE6E79A-F189-4D16-A421-26D8AB694D33@microsoft.com...[vbcol=seagreen]
> Public class xxxxxxxxxxxxxxxxxxxxx
> Protected WithEvents DeptPlaceHolder As
> Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl
> Protected WithEvents DivPlaceHolder As
> Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl
> -------------------------
>
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>         FillHolders()
>  End Sub
>
> --------------------------
>
> Private Sub FillHolders()
>         DivPlaceHolder.Html = DivList.SelectedValue.ToString
>         DeptPlaceHolder.Html = DeptList.SelectedValue.ToString
> End Sub
>
> --------------------------
>
> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button2.Click
>         Label1.Text = DivPlaceHolder.Html.ToString
>         Label2.Text = DeptPlaceHolder.Html.ToString
>
>         'Dim util As System.Web.HttpUtility
>         'Label1.Text = HttpUtility.HtmlDecode(DivPlaceHolder.Html)
>         'Label2.Text = HttpUtility.HtmlDecode(DeptPlaceHolder.Html)
> End Sub
>
> Thanks
>
> Paulo Rosa
>
> "Stefan [MSFT]" wrote:
> 
rights.[vbcol=seagreen] 
http://download.microsoft.com/downl...
+Server[vbcol=seagreen] 
http://download.microsoft.com/downl...
+Server[vbcol=seagreen] 
posted[vbcol=seagreen] 
retrieving[vbcol=seagreen] 
that[vbcol=seagreen] 
no[vbcol=seagreen] 
http://download.microsoft.com/downl...egory/4983.aspx[vbcol=seagreen] 
http://www.gotdotnet.com/community/...
+Server[vbcol=seagreen] 
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx[vbcol=seagreen] 
message[vbcol=seagreen] 
I[vbcol=seagreen] 
invisible,[vbcol=seagreen] 
use[vbcol=seagreen] 
the[vbcol=seagreen] 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:33 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register