Groups | Blog | Home
all groups > asp.net webcontrols > october 2006 >

asp.net webcontrols : Wizard - setting the size


David Thielen
10/9/2006 4:50:02 PM
Hi;

Whats the best way to set the size of a wizard so each page has the
next/prev buttons in the same place? I thought the control would have those
properties but either I'm blind or they are missing.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

stcheng NO[at]SPAM online.microsoft.com
10/10/2006 12:00:00 AM
Hello Dave,

As for the Wizard control, its UI is divided into three parts:

** The sidebar template at left side
** The main wizard steps in the main section(middle)
** The navigation template at the bottom

So the next/prev buttons are actually part of the navigation template, you
can use a Table to layout your wizard steps template so that the wizard has
fixed size for each step. Then in the Navigation templates(start
navigation, step navigation, end navigation..) you can adjust the
navigation buttons. For example, the following template use table to
construct the main wizard steps's layout and use another table to layout
the navigation template(wrapper the navigation buttons in it)

=======================================
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="1">
<WizardSteps>
<asp:WizardStep ID="Step1" runat="server" Title="Step 1">
<table border="1" style="width:300px;height:300px">
<tr>
<td valign="top">
<asp:Label ID="Label1" runat="server" Text="Step
1"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
</table>

</asp:WizardStep>
<asp:WizardStep ID="Step2" runat="server" Title="Step 2">

<table border="1" style="width:300px;height:300px">
<tr>
<td valign="top">
<asp:Label ID="Label2" runat="server" Text="Step
2"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
<br />
<asp:LinkButton ID="LinkButton1"
runat="server">LinkButton</asp:LinkButton>
<br />
<asp:TextBox ID="TextBox4"
runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox5"
runat="server"></asp:TextBox>

</td>
</tr>
</table>

</asp:WizardStep>
<asp:WizardStep ID="Step3" runat="server" Title="Step 3">
<table border="1" style="width:300px;height:300px">
<tr>
<td valign="top">
<asp:Label ID="Label3" runat="server" Text="Step
3"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
</table>

</asp:WizardStep>
</WizardSteps>
<StartNavigationTemplate>
<table style="width:100%;height:50">
<tr>
<td>
<asp:Button ID="StartNextButton" runat="server"
CommandName="MoveNext" Text="Next" />
</td>
</tr>
</table>

</StartNavigationTemplate>
<StepNavigationTemplate >
<table style="width:100%;height:50" >
<tr>
<td >
<asp:Button ID="StepPreviousButton" runat="server"
CausesValidation="False" CommandName="MovePrevious"
Text="Previous" />
<asp:Button ID="StepNextButton" runat="server"
CommandName="MoveNext" Text="Next" />
</td>
</tr>
</table>

</StepNavigationTemplate>
<FinishNavigationTemplate>
<table style="width:100%;height:50">
<tr>
<td>
<asp:Button ID="FinishPreviousButton" runat="server"
CausesValidation="False" CommandName="MovePrevious"
Text="Previous" />
<asp:Button ID="FinishButton" runat="server"
CommandName="MoveComplete" Text="Finish" />
</td>
</tr>
</table>

</FinishNavigationTemplate>

</asp:Wizard>
===================================


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen
10/10/2006 7:07:03 AM
ok - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




[quoted text, click to view]
AddThis Social Bookmark Button