|
Home > Archive > Microsoft Content Management Server > April 2004 > Custom Control with ImageplaceHolder
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Custom Control with ImageplaceHolder
|
|
|
| Hi,
you have to use a SingleImagePlaceholderControl.
And you need a ImagePlaceholder Definition for this.
this should work
SingleImagePlaceholderControl imgph =3D new=20
SingleImagePlaceholderControl();
imgph.PlaceholderToBind =3D "yourImagePhDefinition";
authoringContainer.Controls.Add(imgph);
now you can use the Control to add Images and when you=20
save it you can read the URL and ALT and save it to you=20
XML.
In LoadPlaceholderContentForAuthoring you can assing the=20
URL and ALT from you XML to the=20
SingleImagePlaceholderControl.
I have done something like that to save an=20
unknown/unlimited number of images from the resource=20
gallery in one posting.
G=F6ran
>-----Original Message-----
>Hi
>
>I have created a custom control which saves the data=20
back as XML
>definition. When I create the authoring child controls I=20
want to
>create an ImagePlaceHolder:
>
>'create Imageplaceholder
>Dim objImgPlaceHolder As ImagePlaceholder =3D New=20
ImagePlaceholder
>
>But how do I add it to the authoringContainer since its=20
not a web
>control? I dont need the ImagePlaceHolder to have its=20
own store
>because I can retrieve its image URL and store it in my=20
XML of my
>overall custom control.
>
>Thanks..
>.
>
| |
|
| Awesome.. thanks
<anonymous@discussions.microsoft.com> wrote in message news:<54b701c42d17$b105c6a0$a401280a@phx.gbl>...
> Hi,
>
> you have to use a SingleImagePlaceholderControl.
> And you need a ImagePlaceholder Definition for this.
>
> this should work
> SingleImagePlaceholderControl imgph = new
> SingleImagePlaceholderControl();
> imgph.PlaceholderToBind = "yourImagePhDefinition";
> authoringContainer.Controls.Add(imgph);
>
> now you can use the Control to add Images and when you
> save it you can read the URL and ALT and save it to you
> XML.
>
> In LoadPlaceholderContentForAuthoring you can assing the
> URL and ALT from you XML to the
> SingleImagePlaceholderControl.
>
> I have done something like that to save an
> unknown/unlimited number of images from the resource
> gallery in one posting.
>
> G ran
|
|
|
|
|