ContentTemplateContainer=string in msdn2 samples

W

WT

Hello,

Trying to figure out how to set an image in background of all content steps
for my CreateUserWizard, I found
this documentation in msdn2 about:
<asp:TemplatedWizardStep runat=server ContentTemplateContainer=string....>
and no explanation about ContentTemplateContainer=string.
Elsewhere in documentation for CreateUserWizard it is stated that
ContentTemplateContainer is an internal value, what is the meaning of this
string value ?
Is there a way to define the type of container, a placeholder ?
How to have a common image set in background for templatated steps ?

Moreover what is the <SideBarTemplate> usage ? I can't see it in designer
..

Thanks for help

CS
 
G

Guest

Hello,

Trying to figure out how to set an image in background of all content steps
for my CreateUserWizard, I found
this documentation in msdn2 about:
<asp:TemplatedWizardStep runat=server ContentTemplateContainer=string....>
and no explanation about ContentTemplateContainer=string.
Elsewhere in documentation for CreateUserWizard it is stated that
ContentTemplateContainer is an internal value, what is the meaning of this
string value ?
Is there a way to define the type of container, a placeholder ?
How to have a common image set in background for templatated steps ?

Moreover what is the <SideBarTemplate> usage ? I can't see it in designer
.

Thanks for help

CS

I think it's an error in documentation, it shouldn't be used in
declarative syntax. Regarding background - look at the following
article

How to: Customize the ASP.NET CreateUserWizard Control
http://msdn2.microsoft.com/en-us/library/ms178342.aspx

Hope this helps
 
W

WT

Thanks Alexey, I know this, but there is no detailled info on the template
styles and usage.

CS
 
G

Guest

Thanks Alexey, I know this, but there is no detailled info on the template
styles and usage.

Can't you do something like this?

<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<table border="0" style="background: #ccc url(image.jpg) no-repeat
bottom right">
.....
 
W

WT

Yes it is the solution I get.

Anon User said:
Can't you do something like this?

<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<table border="0" style="background: #ccc url(image.jpg) no-repeat
bottom right">
....
 
W

Walter Wang [MSFT]

Hi CS,

Note the CreateUserWizard inherits from Wizard class. SideBarTemplate is a
property of Wizard class:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.wizard.si
debartemplate.aspx


ContentTemplateContainer is a property of class TemplatedWizardStep. To
understand its usage, we need to first understand ITemplate and
TemplatedContainerAttribute.

When a template control instantiates, it needs a container to act as the
binding context of the controls inside the template. For example, you can
use <%# Container.TypedProperty %> in a template to access properties from
the control container. In this case, this property is a control name that
will be used as ContentTemplate's container.

#Templated Server Control Example
http://msdn2.microsoft.com/en-us/library/ms178657(vs.80).aspx

#Mike Christensen: Web Dev Guy : Templates - Part 2
http://blogs.msdn.com/mikechr/archive/2006/04/26/583926.aspx

Now back to the question about setting a background image for all steps in
the CreateUserWizard, since this ContentTemplateContainer/ContentTemplate
is only a property of a single wizard step, I don't think it will help
here. Actually we can create a stylesheet rule and apply it to the
CreateUserWizard control itself:

<head runat="server">
<title>Untitled Page</title>
<style type="text/css">

.test {
background-image: url('img25.jpg');
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard CssClass="test" ID="CreateUserWizard1"
runat="server" ActiveStepIndex="1">
...


Hope this helps.



Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top