将代码从asp控件迁移到telerik控件 [英] migrate code from asp controls to telerik controls

查看:60
本文介绍了将代码从asp控件迁移到telerik控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将

UpdatePanel

控件迁移到telerik组件。我有多个列表框。这些列表框的数据是从数据库中获取的。



control to telerik component. I've multiple listbox. The data for these listbox are fetched from the database.

<tr>
    <td>
        &nbsp;User Name
    </td>
    <td>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ListBox ID="userName" runat="server" AutoPostBack="True"

                    OnSelectedIndexChanged="getName_SelectedIndexChanged"></asp:ListBox>
            </ContentTemplate>
        </asp:UpdatePanel>
    </td>
</tr>

<tr>
    <td>
        &nbsp;User Code&nbsp;:
    </td>
    <td>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:ListBox ID="userCode" runat="server"></asp:ListBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="userCode"

                    Display="Dynamic" ErrorMessage="* Please select User Code" SetFocusOnError="True" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="userCode" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
    </td>
</tr>





在我的场景中使用什么代替 UpdatePanel ,这将是合适的 RadAjaxManager或RadAjaxPanel

推荐答案

很抱歉,但没有人能回答你的问题。我在评论中提供了原因。


选择合适组件的最佳方法是阅读文档:

RadAjaxManager概述 [ ^ ]

RadAjaxPanel概述 [ ^ ]



快速概览:



RadAjaxManager RadAjaxPanel
RadAjaxManager是ASP.NET AJAX UI的两个主要控件之一。另一个是AJAX Panel。 RadAjaxManager允许开发人员快速开发功能强大且复杂的AJAX解决方案。



RadAjaxManager的主要功能是:

*你可以使用AJAX启用所有功能通常使用回发的控件。

*它允许您定义可视和无代码(在Visual Studio设计时)哪些控件应该启动AJAX请求以及哪些控件应该更新。

*您不需要修改您的应用程序逻辑。

*您可以一次更新多个页面元素,无论它们在页面上的位置如何。

*你不需要手动编写任何JavaScript或调用AJAX请求。



使用页面上的单个RadAjaxManager,您可以创建复杂的Web应用程序,如MicrosoftOutlook®WebAccess门户。
RadAjaxPanel控件提供了支持AJAX的ASP.NET Web控件的最简单方法。您只需将希望启用Ajax的控件放入RadAjaxPanel,Telerik RadAjax负责其余部分。最重要的是,这对于支持Ajax的框架和控件是透明的。



RadAjaxPanel的主要功能是:

* Ajax-启用通常使用回发的所有内部控件。

*在视觉上和无代码(在Visual Studio设计时)定义哪些元素应通过AJAX请求更新。包含在面板中的所有元素都将通过AJAX更新

*无需修改应用程序逻辑

*允许您一次更新多个页面元素

*无需手动编写任何JavaScript或调用AJAX请求
Sorry, but no one can answer your question. I provided the reasons in the comment to the question.

The best way to choose proper component is to read the documentation:
RadAjaxManager Overview[^]
RadAjaxPanel Overview[^]

Quick overview:

RadAjaxManagerRadAjaxPanel
RadAjaxManager is one of the two major controls of the UI for ASP.NET AJAX. The other one is AJAX Panel. RadAjaxManager allows developers to rapidly develop powerful and complex AJAX solutions.

The main features of RadAjaxManager are:
* You can AJAX-enable all controls that normally work with postbacks.
* It lets you define visually and codeless (in Visual Studio design-time) which controls should initiate AJAX requests and which controls should be updated.
* You do not need to modify your application logic.
* You can update a number of page elements at once regardless of their position on the page.
* You do not need to write any JavaScript or invoke AJAX requests manually.

Using a single RadAjaxManager on the page you can create complex web applications like Microsoft Outlook ® Web Access portal.
The RadAjaxPanel control provides the easiest way to AJAX-enable ASP.NET web controls. You simply need to place the controls that you want Ajax-enabled into a RadAjaxPanel and Telerik RadAjax takes care of the rest. Best of all, this happens transparently to the framework and the controls that are being Ajax-enabled.

The main features of RadAjaxPanel are:
* Ajax-enables all controls inside that normally work with postbacks.
* Defines visually and codeless (in Visual Studio design-time) which elements should be updated via AJAX requests. All elements wrapped in the panel will be updated via AJAX
* No need to modify your application logic
* Allows you to update a number of page elements at once
* No need to write any JavaScript or invoke AJAX requests manually


这篇关于将代码从asp控件迁移到telerik控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆