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