New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Replace Elements


This example illustrates how you can replace particular placeholders in the document with run, image or table in RadWordsProcessing. You can export the document to the DOCX format.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" CodeFile="DefaultVB.aspx.vb" AutoEventWireup="false" Inherits="Telerik.WordsProcessing.ReplaceElements.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
      <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
        <div id="SpreadProcessing" class="demo-container">
        <div class="top">
            <div class="demo-container">
                <asp:Image ImageUrl="Images/ReplaceElements.png" ID="SampleDocumentImage"  runat="server" />
            </div>
            <telerik:RadButton RenderMode="Lightweight" Width="200px" Text="Replace Elements"  ID="Replace" OnClick="Replace_Click" runat="server" /><br />
            </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance