How to copy a the reference of a ImagePlaceHolder on another
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
How to copy a the reference of a ImagePlaceHolder on another

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
Ismael
Guest





Posted: Fri Nov 04, 2005 5:50 pm    Post subject: How to copy a the reference of a ImagePlaceHolder on another Reply with quote

Hi everyone

I have two postings in different channels and I need to copy the content of
a placeholder of one posting into another placeholder of same type of
another posting of another channel. The 2 placeholder are Imageplaceholder.
Thankyou

Ismael
Back to top
Stefan [MSFT]
Guest





Posted: Mon Nov 07, 2005 5:50 pm    Post subject: Re: How to copy a the reference of a ImagePlaceHolder on ano Reply with quote

Hi Ismael,

first of all: only do this if the reference is pointing to a resource
gallery item.
copying the reference to a local image is not supported and can cause
problems.

To copy the content do the following:

Posting source = ...;
Posting destination = ...;

ImagePlaceholder sourceImgPh = source.Placeholder["imgPh"] as
ImagePlaceholder;
ImagePlaceholder destImgPh = destination.Placeholder["imgPh"] as
ImagePlaceholder;

destImgPh.Src = sourceImgPh.Src;

Don't forget to commit the changes to the repository. Also ensure that the
above code is executed in update mode.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Ismael" <itech123@kio.com> wrote in message
news:085C29D3-AF22-4A0B-B941-44708E81DC1F@microsoft.com...
Quote:
Hi everyone

I have two postings in different channels and I need to copy the content
of
a placeholder of one posting into another placeholder of same type of
another posting of another channel. The 2 placeholder are
Imageplaceholder.
Thankyou

Ismael
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

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




New Topics Powered by phpBB