无法理解如何使用DevExpress选项卡控件

时间:2012-07-19 14:41:33

标签: c# asp.net devexpress

我无法获得如何使用DevExpress选项卡控件。我拖动控件并添加了三个标签,当我尝试将内容放入正确的标签时,它表示DevExpress.Web.ASPxTabControl.Tab没有名为div的公共属性。

以下是代码:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AddNews.aspx.cs" Inherits="MarketingAdmin.EditNews" %>

<%@ Register Assembly="DevExpress.Web.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxHtmlEditor.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxHtmlEditor" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxSpellChecker.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSpellChecker" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
       <dx:ASPxTabControl ID="ASPxTabControl1" runat="server" ActiveTabIndex="0" 
        EnableTheming="True" Theme="Glass">
        <Tabs>
            <dx:Tab Text="Казахский" >
                <div style="font-family=Times New Roman; font-size:medium ">Категория 
        <asp:DropDownList ID="CategoryDropDownList" runat="server" 
            DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="id" ></asp:DropDownList> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MarketingConnectionString %>" 
            SelectCommand="SELECT [Name], [id] FROM [NewsCategory]"></asp:SqlDataSource>
    </div>
    <div style="font-family=Times New Roman; font-size:medium "> Заголовок 
        <asp:TextBox ID="TitleTextBox" runat="server" Width="610px"></asp:TextBox></div>

<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
</dx:ASPxHtmlEditor>            
            </dx:Tab>
            <dx:Tab Text="Русский">
            content 2
            </dx:Tab>
            <dx:Tab Text="Английский">
            content 3
            </dx:Tab>
        </Tabs>
    </dx:ASPxTabControl>


    <asp:Button ID="SaveButton" runat="server" Text="Сохранить" 
        onclick="SaveButton_Click" />
</asp:Content>

有人能帮助我吗?

1 个答案:

答案 0 :(得分:1)

根据您的要求,我认为您需要使用ASPxPageControl。 ASPxTabControl只是创建一个tabtrip,条带下面没有实际的“tabs”。它最适用于网站导航。