Also learn ASP. NET 2.0 Ajax 1.0: Use scriptmanager, updatepanel, updateprogress

Source: Internet
Author: User
Also learn ASP. NET 2.0 Ajax 1.0: Use scriptmanager, updatepanel, updateprogress
1. Download and install
Aspajaxextsetup. MSI
Aspajaxctp. MSI
Ii. Install the adventureworks Sample Database
3. Open vs. net2005 and select ASP. NET Ajax-enabled web site.
4. default. aspx page
Code:

<Div> Prefix = "o"?>

<Asp: scriptmanager id = "scriptmanager1" runat = "server">

</ASP: scriptmanager>

</Div>

<Asp: updatepanel id = "updatepanel1" runat = "server">

<Contenttemplate>

<Asp: gridview id = "gridview1" runat = "server" allowpaging = "true" cellpadding = "4" datasourceid = "sqldatasource1"

Forecolor = "#333333" gridlines = "NONE" onpageindexchanged = "gridview1_pageindexchanged">

<Footerstyle backcolor = "#990000" font-bold = "true" forecolor = "white"/>

<Rowstyle backcolor = "# fffbd6" forecolor = "#333333"/>

<Selectedrowstyle backcolor = "# ffcc66" font-bold = "true" forecolor = "Navy"/>

<Pagerstyle backcolor = "# ffcc66" forecolor = "#333333" horizontalalign = "center"/>

<Headerstyle backcolor = "#990000" font-bold = "true" forecolor = "white"/>

<Alternatingrowstyle backcolor = "white"/>

</ASP: gridview>

<Asp: sqldatasource id = "sqldatasource1" runat = "server" connectionstring = "<% $ connectionstrings: adventureworksconnectionstring %>"

Selectcommand = "select firstname, lastname from HumanResources. vemployee order by lastname, firstname">

</ASP: sqldatasource>

</Contenttemplate>

</ASP: updatepanel>

<Asp: updateprogress id = "updateprogress1" runat = "server">

<Progresstemplate>

Getting employees... retrieving employee list...

</Progresstemplate>

</ASP: updateprogress>
5. Add the local connection string web. config

</Configsections> Prefix = "o"?>

 

<Connectionstrings>

<Add name = "adventureworksconnectionstring" connectionstring = "Server = xxx \ sqlexpress; database = adventureworks; Integrated Security = sspi; Max pool size = 4; min pool size = 4; "providername =" system. data. sqlclient "/>

</Connectionstrings>

Run
Paste it to word, paste it to HTML, and paste it here

 

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.