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

Save in Database

If you encounter problems, make sure the ASPNET system process has "write" privileges for the directory. How?
  • Show/Hide Border
  • Table Properties
  • Delete Table
  • Row
    • Insert Row Above
    • Insert Row Below
    • Delete Row
  • Column
    • Insert Column to the Left
    • Insert Column to the Right
    • Delete Column
  • Cell
    • Merge Cells Horizontally
    • Merge Cells Vertically
    • Split Cell Horizontally
    • Split Cell Vertically
    • Delete Cell
  • Cell Properties
  • Table Properties
  • Properties...
  • Image Map Editor
  • Properties...
  • OpenLink
  • Remove Link
  • Insert Select
  • Cut
  • Copy
  • Paste
  • Paste from Word
  • Paste Plain Text
  • Paste As Html
  • Paste Html
DeleteEditDateText
84DeleteEdit10/31/2024 9:25:03 AM

Barcelonaaaaaa

Barcelona is an excellent place to discover world-class arts and culture. The sights in Barcelona are second to none. Don’t miss the architectural wonder, Casa Mila - otherwise known as La Pedrera. You’ll want to see another one of Antoni Gaudi’s architectural masterpieces, Casa Batllo, which is located at the center of Barcelona.

Tenerife, one of the nearby Canary Islands, is the perfect escape once you’ve had your fill of the city. In Los Gigantes, life revolves around the marina. Take a boat out in search of bottlenose dolphins and whales. While you’re in Tenerife, visit Mount Teide. It’s the highest point in Spain and the third-largest volcano in the world.

Attractions
IMAGE LOCATION DESCRIPTION VISIT
Los Gigantes, Tenerife Los Gigantes is located on the south-west coast of the Canary Island, Tenerife. It’s a cozy and tranquil resort town framed by a backdrop of magnificent cliffs. book a visit >>
Casa Mila, Barcelona Casa Mila, more commonly known as La Pedrera, is a quirky modernist apartment building designed by Antoni Gaudi in Barcelona, Spain.  book a visit >>
Mount Teidet, Tenerife At 12,200 feet (3,718 meters) Mount Teide is the highest mountain in Spain and the third-largest volcano in the world. book a visit >>

 

Destinations Full Price Info Comments
  • Barcelona
  • Tenerife
  • Santa Cruz
  • Teide
  • $800 per person sharing
  • $900 per single occupancy
  • $700 per child
We enjoyed a marvelous stay at this location. Very warm welcome, extremely kind and helpful hostess. For sure, we'll come back! Samuel Elms, London.
85DeleteEdit11/8/2024 5:43:27 PM

Barcelona & Tenerife

Barcelona is an excellent place to discover world-class arts and culture. The sights in Barcelona are second to none. Don’t miss the architectural wonder, Casa Mila - otherwise known as La Pedrera. You’ll want to see another one of Antoni Gaudi’s architectural masterpieces, Casa Batllo, which is located at the center of Barcelona.

Tenerife, one of the nearby Canary Islands, is the perfect escape once you’ve had your fill of the city. In Los Gigantes, life revolves around the marina. Take a boat out in search of bottlenose dolphins and whales. While you’re in Tenerife, visit Mount Teide. It’s the highest point in Spain and the third-largest volcano in the world.

Attractions
IMAGE LOCATION DESCRIPTION VISIT
Los Gigantes, Tenerife Los Gigantes is located on the south-west coast of the Canary Island, Tenerife. It’s a cozy and tranquil resort town framed by a backdrop of magnificent cliffs. book a visit >>
Casa Mila, Barcelona Casa Mila, more commonly known as La Pedrera, is a quirky modernist apartment building designed by Antoni Gaudi in Barcelona, Spain.  book a visit >>
Mount Teidet, Tenerife At 12,200 feet (3,718 meters) Mount Teide is the highest mountain in Spain and the third-largest volcano in the world. book a visit >>

 

Destinations Full Price Info Comments
  • Barcelona
  • Tenerife
  • Santa Cruz
  • Teide
  • $800 per person sharing
  • $900 per single occupancy
  • $700 per child
We enjoyed a marvelous stay at this location. Very warm welcome, extremely kind and helpful hostess. For sure, we'll come back! Samuel Elms, London.
86DeleteEdit11/8/2024 5:46:40 PMwords

The main way to save the RadEditor's content in a database is to add your own asp button with database-saving code attached in the button click event handler.The above example does this using an asp datagrid to view the updated content of the database as well as Edit and Delete the content. The Content property is used to get and set the editor content.

Please, note that the page is not XHTML compliant due to that the <a> tags loaded in RadEditor contain target="_blank" attributes. There isn't a target attribute in XHTML specification.

Note: If you encounter problems with the demo, make sure the ASP.NET system process has "write" privileges for the directory:

Here's how:

  • Right-click on the web application folder, and select Properties.
  • Select the "Security" tab.
  • Click "Add..." to add a user.
  • On the new dialog click "Advanced...".
  • On the new dialog click "Find now...".
  • Select ASP.NET user from the list of available users.
  • When you go back to the "Security" tab select the ASPNET user and give it full permissions.

Related Resources

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Theme="Default" Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs"Inherits="Telerik.Web.Examples.Editor.SaveInDatabase.DefaultCS"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
<link href="../Common/styles.css" rel="stylesheet" type="text/css" />
    <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" />
    <qsf:MessageBox ID="InformationBox1" runat="server" Type="Info" Icon="Info">
        If you encounter problems, make sure the
            ASPNET system process has "write" privileges for the directory. <a href="#data-base-issues">How?</a>
    </qsf:MessageBox>

    <div class="demo-container size-custom">
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>

        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <input type="hidden" name="EditedNews" runat="server" id="EditedNews" />
  
            <asp:RequiredFieldValidator runat="server" ID="NewsTextValidator" 
                ControlToValidate="NewsEditor" Display="Static" ForeColor="Red" BackColor="Wheat">
                Please, fill in text to submit!
            </asp:RequiredFieldValidator>

            <telerik:RadEditor RenderMode="Lightweight" ID="NewsEditor" runat="server" Width="1000px" Height="450px" SkinID="DefaultSetOfTools">
                <Modules>
                    <telerik:EditorModule Name="RadEditorStatistics" Visible="false" Enabled="true"></telerik:EditorModule>
                    <telerik:EditorModule Name="RadEditorDomInspector" Visible="false" Enabled="true"></telerik:EditorModule>
                    <telerik:EditorModule Name="RadEditorNodeInspector" Visible="false" Enabled="true"></telerik:EditorModule>
                    <telerik:EditorModule Name="RadEditorHtmlInspector" Visible="false" Enabled="true"></telerik:EditorModule>
                </Modules>
            </telerik:RadEditor>

            

            <telerik:RadButton RenderMode="Lightweight" ID="btnSubmit" runat="server" Text="Submit to Database" OnClick="btnSubmit_Click" CssClass="submit-button"></telerik:RadButton>

            <telerik:RadGrid RenderMode="Lightweight" CssClass="borderedGrid" ID="NewsGrid" Width="1000px" runat="server" ShowHeader="True"
                BorderWidth="1" CellPadding="3" AutoGenerateColumns="false" OnItemCommand="NewsGrid_ItemCommand"
                DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true"
                AllowAutomaticUpdates="true">
                <HeaderStyle CssClass="newsTextCentered gridHeader" Font-Names="Verdana" ForeColor="Black"
                    BackColor="#d3e5fa"></HeaderStyle>
                <MasterTableView EditMode="InPlace" DataKeyNames="NewsID">
                    <Columns>
                        <telerik:GridBoundColumn DataField="NewsID" UniqueName="NewsID" Display="false" ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ButtonType="LinkButton" ItemStyle-CssClass="newsTextCentered"
                            CommandName="Delete" ItemStyle-Width="50px" HeaderText="Delete" Text="Delete">
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn ButtonType="LinkButton" ItemStyle-CssClass="newsTextCentered"
                            CommandName="Edit" ItemStyle-Width="50px" HeaderText="Edit" Text="Edit">
                        </telerik:GridButtonColumn>
                        <telerik:GridBoundColumn ItemStyle-CssClass="NewsText" ItemStyle-Width="70px" DataField="NewsDate"
                            HeaderText="Date" ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="NewsText" UniqueName="NewsText" ItemStyle-CssClass="text"
                            HeaderText="Text" ReadOnly="true">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
                DeleteCommand="DELETE FROM [News] WHERE [NewsID] = @NewsID" InsertCommand="INSERT INTO [News] ([NewsText], [NewsDate]) VALUES (@NewsText, GETDATE())"
                SelectCommand="SELECT * FROM [News]" UpdateCommand="UPDATE [News] SET [NewsText] = @NewsText WHERE [NewsID] = @NewsID">
                <DeleteParameters>
                    <asp:Parameter Name="NewsID" Type="Int32"></asp:Parameter>
                </DeleteParameters>
            </asp:SqlDataSource>

        </telerik:RadAjaxPanel>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance