Forms Data Controls :: DropDownList Binding - Ways To Increase Speed?
Oct 20, 2010
I have a gridview that displays query results on a reporting page for a "home-grown" CRM application. From the gridview, a link can be clicked which opens a modal window that contains an iframe linked to a "details" page where record specific info can be viewed/altered. On the details page there are 10 or so dropdownlists (ddls) that are bound every time the page is called. The ddls are bound using a method similar to the example below. I am looking for a way top speed things up a bit. The details page could be called 10-20 times in one session and every time the page loads these ddls have to be bound from the same methods but for different records. What are some options for speeding up the load time for this page??
I am facing problem with images loading time. In my form I have image server control placed in repeater control. The repeater control every time binds atleast 300 images. When we want to see all the images at a time the page is taking lot of time(atleast 3 to 4 mins) to display. But I need the page should be loaded fast.
The image url is from physical location.And the information related to image is coming from database.
I am using .net framework 3.5 and C#.net as language in asp.net web application.
I have Sql Table for Products that have ~8000 records. In my web form I want use dropdown list to edit code with dropdown list. This drop down list populate very slow. How to increase speed to populate dropdown list with large amount data.
I know its a common question. But I want to share something. Actually I am working on e-commerce portal. It consists of 32000 products with around 2500 categories. I used 3-tier architechture for this project.Everyting is coming using stored procedures. I used master pages as well.But still I am fighting with the performance issue. Can anyone pls tell me some usefull steps to increase the speed of the website.Its taking ages to load the pages. please look at the site
I've been using things like Firebug and YSlow, so I'm not really looking for advice on increasing page load speeds, but I'm wondering does extra imports or using, especially if your importing or using classes that aren't necessary, cause a page to load slower?
private void AddDBDataToControl(DataSet app_Support,int count) { int i = 0; while (count != 0) { DateTime dt = Convert.ToDateTime(app_Support.Tables[0].Rows[i]["FromDate"].ToString()); //dt=23/08/2010 10:04:00 AM DropDownList h1 = (DropDownList)GVDate.Rows[i].Cells[1].FindControl("txthour"); h1.SelectedValue = dt.Hour.ToString(); DropDownList m1 = (DropDownList)GVDate.Rows[i].Cells[2].FindControl("txtmin"); m1.SelectedValue = dt.Minute.ToString(); DropDownList h2 = (DropDownList)GVDate.Rows[i].Cells[5].FindControl("txthourto"); DateTime dt2 = Convert.ToDateTime(app_Support.Tables[0].Rows[i]["ToDate"].ToString()); //dt2=28/08/2010 14:25:00 PM h2.SelectedValue = dt2.Hour.ToString(); DropDownList m2 = (DropDownList)GVDate.Rows[i].Cells[6].FindControl("txtminto"); m2.SelectedValue = dt2.Minute.ToString(); count--; i++; } } When the function executes h1.SelectedValue = "10"; and m1.SelectedValue ="04"; but when it reaches to count-- h1.SelectedValue takes the value "14"; rather than h1.SelectedValue = "10"; and h2.SelectedValue = "14"; and m1.SelectedValue ="25"; rather than m1.SelectedValue ="04"; and m2.SelectedValue = "25"
these order numbers in table t2 have many part numbers(and hence the need for a second table t2)
I can display t1 using gridview just fine
In that same gridview iI have added a template column containing a dropdownlist(to show partnumbers)
now how can I bind this dropdownlist to the order number so that when the page is loaded the user can click on the dropdownlist to see all the partnumbers associated with that order number.
I have a gridview where I can browse an user's information. Through the gridview I'm also able to edit some of this information. A recent change in my client's needs demands that one of these fields is now a DropDownList. This field represents a user's "schedule" (not literally a schedule but works like one), and the different schedule options to be assigned to a user are shown in the drop down list.
Problem: In the drop down list I want to show list items like "9-12 15-17", "10-14 15-18" so that it is easy for the administrator to tell which schedule he's assigning to an user. However, that shouldn't be their actual value. I need "9-12 15-17" to actually be '1' since this is the schedule ID that I'm trying to pass on to the DB.
Here's what I have so far: [Code]....
And with this last method I change the selected item's value to the Index. Meaning that if I select "9-12 15-17" which has an Index of 1 in the dropDownList, the actual value is now 1. Again, this is the behavior I expect. My experience with ASP is quite little as I'm new on this, but as far as I know, this only actually updates the string array. How would I go about modifying this to reflect my updates on the database? All input is taken into account.
I'm having trouble binding my textbox to my dropdownlist. I got it to work but I don't think it is the correct way of doing it. I have my DDL bound to a datasource and populating everything correctly. However, I couldn't find a better way of binding my textbox to it besides using the FormView control and its counterpart, Templates (edit,insert,etc) It looks messy and i was hoping there was a better way of doing it. I've researched it online for awhile now but I couldn't understand how to implement for my situation.
My DDL has company names in it and the datasource has all the information from the table including what I'm trying to have my textbox pull (Address).
I have a Dropdownlist in an itemTemplate in a gridview. My gridView binds to dataTable1 (from which the selected value for dropdown comes from) and dropDown binds to dataTable2 (i need to get DataValueField and DataTextField from here).
I'm trying to bind a value to a dropdownlist. Here how the code looks like in the aspx page...Bind the textboxes below is not a problem...but its not working with the dropdownlist..
So basically, what i want is the value selected from the dropdownlist to be remembered after i press next button and back button..
I select a item from gridView and trying to show/update/delete in From view. In Form View I am using the dropdownlist filling it in Code behind. Then i bound the list. But the problem is it is not showing the slected value. Here is the code
I am having problem to do a 2 way binding with DropDownList inside DetailsView, my markup declaration is:
[Code]....
But I am getting the following error messages on the line ddlCategoryId.DataBind(): ArgumentOutOfRangeException: 'ddlCategoryId' has a SelectedValue which is invalid because it does not exist in the list of items.sometimes I get different error: InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.]
On page load, dropdownlist1 needs to be populated with a list of string objects in a specific table in a sql database. Everytime the selected item in the dropdownlist1 changes, dropdownlist2 needs to be populated with a different table from a database ( I don't know if it can be the same database or not). And it needs to be dynamic, so that everytime the value in dropdownlist1 is changed, the items in dropdownlist2 need to change. All this si being done in VB on a Web Form.
How would I go about doing this? What would the code look like?