ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Editor in Wizard

Edit content


Font Size Header 
Aa
ASP.NET
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor" TagPrefix="obout" %>
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="100%" DisplaySideBar="False"
  OnActiveStepChanged="OnActiveStepChanged" OnFinishButtonClick="OnFinishButtonClick" >
<HeaderTemplate>
<% if (Wizard1.ActiveStep == this.edit_step) { %>
<div style="float:right">
<asp:ImageButton OnClientClick="return navigationClicked();" ID="StartNextButton" runat="server"
  Text="Next" CommandName="MoveNext" ImageUrl="Forward-48-n-ps.gif" />
</div>
<% } else if (this.Wizard1.ActiveStep == this.preview_step) { %>
<div style="float:right">
<asp:ImageButton OnClientClick="return navigationClicked();" ID="StepPreviousButton" runat="server"
  Text="Previous" CommandName="MovePrevious" ImageUrl="Back-48-n-ps.gif" />
<asp:ImageButton OnClientClick="return navigationClicked();" ID="StepNextButton" runat="server"
  Text="Next" CommandName="MoveNext" ImageUrl="Forward-48-n-ps.gif" />
</div>
<% } else if (this.Wizard1.ActiveStep == this.description_step) { %>
<div style="float:right">
<asp:ImageButton OnClientClick="return navigationClicked();" ID="FinishPreviousButton" runat="server"
  Text="Previous" CommandName="MovePrevious" ImageUrl="Back-48-n-ps.gif" />
<asp:ImageButton OnClientClick="return navigationClicked();" ID="FinishButton" runat="server"
  Text="Finish" CommandName="MoveComplete" ImageUrl="Last-48-n-ps.gif" />
</div>
<% } %>
</HeaderTemplate>
<StartNavigationTemplate /><StepNavigationTemplate /><FinishNavigationTemplate />
<WizardSteps>
<asp:WizardStep ID="edit_step" runat="server" Title="Edit content">
<center><h3>Edit content</h3></center><br />
<obout:Editor runat="server" Id="editor" Height="400px" Width="100%" >
<BottomToolbar ShowPreviewButton="false" ShowDesignButton="false" ShowHtmlTextButton="false" />
</obout:Editor>
</asp:WizardStep>
<asp:WizardStep ID="preview_step" runat="server" Title="Preview content">
<center><h3>Content</h3></center><br /><hr style="width:100%" />
<asp:Label runat="server" ID="previewContent" Text="" />
<hr style="width:100%" />
</asp:WizardStep>
<asp:WizardStep ID="description_step" runat="server" Title="Content description">
<center><h3>Content description</h3></center><br /><hr style="width:100%" />
<table cellpadding=0 cellspacing=4 border=0>
<tr>
<td align="left">Total HTML length:</td>
<td align="right"><asp:Label runat="server" style="color:blue;" ID="htmlLength" Text="" /></td></tr>
<tr>
<td align="left">Plain Text length:</td>
<td align="right"><asp:Label runat="server" style="color:blue;" ID="plainLength" Text="" /></td></tr>
</table>
<hr style="width:100%" /><br />
<center>
<asp:Label id="Label1" runat="Server" visible="False" style="color:blue; font-weight: bold; font-size:14pt;" />
</center>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
...
<script runat="server" language="c#">
void OnActiveStepChanged(object sender, EventArgs e)
{
  if (Wizard1.ActiveStepIndex == 1) {
     previewContent.Text = editor.Content;
  }
  else  if (Wizard1.ActiveStepIndex == 2) {
     htmlLength.Text = editor.Content.Length.ToString();
     plainLength.Text = editor.PlainText.Length.ToString();
  }
}
void OnFinishButtonClick(object sender, WizardNavigationEventArgs e)
{
  Label1.Text = "The wizard has been completed.";
  Label1.Visible = true;
}
</script>

"Thanks for the fastest help. You guys are genius. Keep that going. God bless you all !!"

Atanu

Random testimonial   All testimonials