Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 28th, 2011, 02:43 PM
Registered User
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ajax load take alot time in sample action

Hello everybody.

i have problem with ajax load is take more than 15 second for sample action i don't know why load more than 15 second, i will put between your hand example with coding please any one have any soluation tell me I will be grateful.

check example in the link blow:

http://test.clientnshosting.net

when click For Sale or For Rent button just chnage style and save Session,this code style :
Code:
.BtnSearchupSale {
    background-image: url("media/btnupsale.png");
    background-repeat: no-repeat;
    border-bottom-color: -moz-use-text-color;
    border-bottom-style: none;
    border-bottom-width: 0;
    border-top-color: -moz-use-text-color;
    border-top-style: none;
    border-top-width: 0;
    color: #f7841b;
    cursor: pointer;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 22px;
    font-weight: bold;
    height: 63px;
    padding-right: 21px;
    width: 214px;
    margin-top:10px;
}
.BtnSearchdownSale {
    background-image: url("media/btndownsale.png");
    background-repeat: no-repeat;
    border-bottom-color: -moz-use-text-color;
    border-bottom-style: none;
    border-bottom-width: 0;
    border-top-color: -moz-use-text-color;
    border-top-style: none;
    border-top-width: 0;
    color: #4e7502;
    cursor: pointer;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 16px;
    font-weight: bold;
    height: 59px;
    text-align:center;
    width: 139px;
    margin-top:10px;
}
action button to change style and save session code is:
Code:
 <asp:Button ID="btnforsale" runat="server" BorderStyle="None" Text="For Sale" CssClass="BtnSearchdownSale" onclick="btnforsale_Click" />

  protected void btnforsale_Click(object sender, EventArgs e)
    {
        lblprice.Text = "Price";
        btnforsale.CssClass = "BtnSearchupSale";
        btnforrent.CssClass = "BtnSearchdownRent";
        btnforsaleorrent.CssClass = "BtnSearchdownSaleOrRent";
        Label5.Text = "Properties for sale in jordan";
        Session["ddlOfferTypeSearch1"] = "3";
        upPropertySearch.Update();
        upPropertyList.Update();
    }
look at the time load ajax , when use page on localhost is very speed i don't see loading image, but when upload on server windows is so slow, and i am check other server also slow.
i don't know if ajax is take this time or there are problem.
another sample for ajax load when select Department go to database and get category for department also need more than 15 second. also on localhost is very fast fetch data from database
when upload on server is so slow as sample in this link :http://test.clientnshosting.net/default.aspx
look at code fetch data from database (i am use stored procdure)
Code:
  protected void lnkRes_Click(object sender, EventArgs e)
    {
        lbl_type.Text = "Residential";
        lblnote.Text = "";
        clsCategory objcate= new clsCategory();
        DataTable dt = new DataTable();
        objcate.Dept_ID = 1;
        if (objcate.GetCategory(null, null, dt) != -1)
        {
            GVCate.DataSource = dt;
            GVCate.DataBind();
        }
        upPropertyList.Update();
    }
i wish if any one give me soluation, becuase is very bad programmer need alot time.

with best regards
Ahmad Ali


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling the "Regsiter" action method using AJAX (page 122) lagonave BOOK: Professional ASP.NET MVC 2 24 December 12th, 2012 08:37 AM
ajax load take alot time in sample action dailywake BOOK: ASP.NET Website Programming Problem-Design-Solution 0 March 28th, 2011 02:40 PM
JQuery for ASP.NET sample code doesn't load in VS 2008 Aging Hippie All Other Wrox Books 3 August 3rd, 2010 11:24 AM
ASP.NET Ajax client-side framework failed to load mkarmali BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 1 April 6th, 2010 09:01 AM
Sample Ajax Book vigaluna Ajax 1 March 22nd, 2007 05:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.