Real-time search for functional controls in ASP.net using Ajax--realtimesearchmonitor

Source: Internet
Author: User

Web Client Software Factory v2.0 contains a Realtimesearchmonitor control that provides real-time search capabilities to help you use asp.net AJAX local update pages in asp.net.

This article helps you to use the Realtimesearchmonitor control in ASP.net, data from the Customers table of the Northwind database, data access is written in the Enterprise Library, and of course you can use any other way to return the data source, But it's complicated to write an SQL statement without the corporate library!!!

Prerequisite

Use Realtimesearchmonitor must be used in a Web site or Web application project and to meet the following criteria:

Microsoft that is configured as the target. NET Framework 3.5.

The form must have at least one search input control, such as a TextBox control.

The search results must contain asp.net AJAX UpdatePanel controls.

1. Download Web Client Software Factory v2.0, Realtimesearchmonitor source code path is: Web Client Software Factory Realtimesearch\realtimesearch, compile through, reference Realtimesearch.dll to the site on the line.

2. Drag and drop controls to the page

You need to set the Associatedupdatepanelid property to the ID of UpdatePanel.

You need to set the properties in the Controlstomonitor (collection) Targetid point to the input control, and the EventName event is optional if the property is not set to be updated by the Targetid control event by default.

<form id= "Form1" runat= "Server" >
<asp:scriptmanager id= "ScriptManager1" runat= "Server" >
</asp:ScriptManager>
<div>
<asp:textbox id= "TextBox1" ontextchanged= "textbox1_textchanged" runat= "Server"/>
<rts:realtimesearchmonitor id= "Customerrealtimesearchmonitor" runat= "Server" interval= "700"
Associatedupdatepanelid= "UpdatePanel" >
<ControlsToMonitor>
<rts:controlmonitorparameter targetid= "TextBox1"/>
</ControlsToMonitor>
</rts:RealTimeSearchMonitor>
<asp:updatepanel id= "UpdatePanel" runat= "Server" updatemode= "Conditional" >
<ContentTemplate>
<asp:gridview id= "GridView1" runat= "Server" autogeneratecolumns= "False" datakeynames= "CustomerID"
Pagesize= "allowpaging=" "True" width= "690px" onpageindexchanging= "gridview1_pageindexchanging" >
<Columns>
<asp:boundfield datafield= "CustomerID" headertext= "CustomerID" sortexpression= "CustomerID"/>
<asp:boundfield datafield= "CompanyName" headertext= "CompanyName" sortexpression= "CompanyName"/>
<asp:boundfield datafield= "ContactName" headertext= "ContactName" sortexpression= "ContactName"/>
<asp:boundfield datafield= "ContactTitle" headertext= "ContactTitle" sortexpression= "ContactTitle"/>
<asp:boundfield datafield= "City" headertext= "Zip" sortexpression= "City"/>
<asp:boundfield datafield= ' address ' headertext= ' address ' sortexpression= ' address '/>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.