Jump to content

fetch record


sign_seventh

Recommended Posts

hi , i have 6 dropdown in my page, each dropdown consist of big data, i have a problem when the page is reloading cause it takes to much time to load the page again, is there a way which i get all the data in the first load of the page (and pass it to a function or anything).. then when the page reload again the page will not load too long ( i will use the data which i pass in he function). is that possible?

Link to comment
Share on other sites

if you are using ASP.Net you can load the dropdowns on the first load and have then not reload with each refresh by placing them in this if statement.

if(!IsPostBack){	//load dropdowns}

Link to comment
Share on other sites

here's my code://page name: mypage.aspxif(!IsPostBack){ //my select query===// if(d.GetCompanyNameLookup(ref dsCompanyName, ref strErrorDescription)) { cboAltCompany.DataSource = dsCompanyName.Tables[0]; thiscboAltCompany.DataTextField="INSTITUTE"; cboAltCompany.DataBind(); } //end//}//code when i submit//private void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { if(objResume.AddEducation(lngResumeId, strDegree, strInstitute)) { Response.Redirect("mypage.aspx"); } }//my problem is when the page redirect, even if i used the ispostback, it also takes too long to load againor even if i had another dropdown with autopostback value="true" it is still reading my query that is why it takes time to load the page//is ASP.NET Caching capable for storing multiple records like all the value in the dropdown

Link to comment
Share on other sites

thats because you are not just posting back you are actually reloading hte whole page....that is what response.redirect does.You can try Server.Transer("mypage.aspx") instead, it is less intensive.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...