How To Load An GridView From Multiple Sources Asynchronously
Jan 1, 2010
Here is the situation. I need to hit ~50 servers and grab some data from a file. I then want to display a few rows for each in an ASP.NET GridView control.
I tried doing this with Threads/ThreadPool and successfully gather all the data in session.
What I'd like to do, and what I am having a hard time figuring out, is update the grid for the user after each server is done loading.
If I put the databinding code in the thread, it will only display whatever has loaded by the time the response is sent back to the client. If I take it out of the thread, I'd have to wait until all threads were done to send the response, and that doesn't do what I want.
I seeing some stuff about Asynchronous Client Callbacks, but I'm not sure if that's what I need to be using. I have no idea how to manipulate a GridView from Javascript.
View 4 Replies
Similar Messages:
Jun 11, 2012
I have four repeaters, that are all independent to each other. They all bind via web services on page load and then display the results.
There is a noticeable delay however and I would like to know how to achieve the following if possible.
On page load I want to begin asynchronously binding the repeaters so that as soon as the first one is bound, its result display and then the next starts binding.
I looked at update panels but from what I have read they do not have a page load trigger.
View 3 Replies
Feb 5, 2010
I am writing a currency converting module for one of our applications. I have a list of products, a list of currencies we are interested in seeing prices for, and a list of currency rates. I want the user to be able to select which currencies from the list they see in the GridView. I also want to be able to amend my list of currencies and include a new currency, without having to make additional changes to this module. So my GridView display has to be "dynamic". Essentially I am planning on ending up with a GridView that has the following columns:
Part No - Description - USD Price - AUD Price - GBP Price
The USD price would be static as it's our base currency, the AUD and GBP are user selected and could have potentially any number of currencies listed. I would normally use a DataSet and DataTables for this work, but I am sure there is a "better" way to do it using System.Collections.Generics. Right now I have all of the data I need in List collections, but there does not seem to be a way to define how these collections relate to each other, or combine these collections into one so it can be bound to a GridView. Should I be looking at something other than List to achieve this or do I need to go back to my original approach of a DataSet and DataTables.
**UPDATE / SOME CODE**
I will explain a little bit more about what I have setup so far.
1) List of Products & Currencies - These come from an SQL DB via LINQ, so they can be any of the System.Collections.Generics objects, e.g. List, IEnumerable etc.
2) Currency Rates - These I am pulling from the European Bank public XML file. I download the file, strip the data I need out of it and currently store that as a List object.
I could store the currency rates in the database table as well, but then I have to have some sort of background process that goes and updates the rates each day. This way the rates only get updated when someone accesses the report function (which is only going to happen occasionally). So I would rather grab the latest rates "on demand". What I know I need to end up with is some object that has the following structure:
PartNo - Description - Base Price - Currency Price 1, Currency Price 2, Currency Price 3
Where the number of Currency Prices is undefined, as it's based on what currencies the user wants the report to display. It's the undefined part that I am struggling with, essentially how can I create a structured object, that I don't know the complete structure of until runtime?
View 1 Replies
Jul 16, 2010
I need to display some data in a gridview. Its shipping data.
Part of the data can come from a generic database query. Static shipping data that can be looked up from the database. Part of the data is external and has to be queryed from USPS. Any suggestions on what is the best way to accomplish this.
Should I just programmatically fill the gridview from the code behind doing the database lookup manual and filling the gridview with manual data then going out and filling the rest of the gridview with the data obtained from the USPS service?
View 2 Replies
Jul 27, 2010
On the home page of my site I want to display a lot of products which have images which are quite large. Currently the page is taking so long to load that it is actually timing out and the page fails to display!
In MVC, or just ASP.NET in general, how can I load an image asynchronously? Basically what I want to do is display the details of the product and just display a small loading image e.g. ajaxload.info. until the image is loaded.
I assume this is going to require some javascript/jQuery...
View 2 Replies
Feb 9, 2011
I am using ASP.NET and SQL Server. I would like to load data from database asynchronously and show data which are partially loaded immediately.Suppose there are tons of records in a query result. After 3 sec,It loads 20% then I have to process and show 20% data immediately, not waiting for complete response. I know $.Ajax in jQuery to load data async. Is it possible to process partial response, Not wait for complete response and show it immediately.
View 4 Replies
Dec 21, 2010
I am using a third party service for location time(zonal).If I pass latitude and longitude of the location with service URL it returns the time of that location in XML format.But the problem is some of the time this service gets too much slow so because of that my home page gets stuck because its a synchronous call of that service.here my code-
string TimeZoneUrl = "http://ws.geonames.org/timezone?";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(TimeZoneUrl + "lat=" + latitude + "&lng=" + longitude);
XmlElement root = xmlDoc.DocumentElement;
XmlNodeList nodes = root.SelectNodes("//*");
How can I make this a asynchronous call?
View 1 Replies
Aug 26, 2010
I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:
[Code]....
When I transfer the *.rpt files to a different server, the reports display data from the development server; even when I change "Constants.DatabaseName" to point to the new server. It seems like the *.rpt file saves the database connection information from the ODBC File DNS used when creating the report.Has anyone experienced this problem? I'm looking for a solution so I don't have to create multiple copies of my *.rpt files for each server environment (i.e., Dev, Test and Production servers).
View 2 Replies
Jun 1, 2010
We use the caching and logging application blocks from entlib 4.1. We want to keep the configuration of those two in seperate files. How can we achieve this?It looks like entlib is always using the selected Source as it configuration.I tried the following:
[code...]
But this doesn't work because the application blocks always use the selected Source attribute value.
View 1 Replies
Feb 1, 2011
So I have been trying to follow serenarules posts about persistence layers, but I seem to be missing something.
The persistence layer is an architectural layer whose job is to provide an abstract interface to information storage mechanism(s).
This makes sense to me, but I am still having a hard time with this.
So in what cases is this necessary? When you are pulling similar data from multiple information sources?
View 7 Replies
Feb 23, 2011
I have one view page (MyView.aspx) and many data sources to bind on this page. Lets say it has Books, Publishers, Comments, etc. Each one of those has an object which provides a List, List, etc. In my view, what are my optiosn for multilple model biding? I want to check to see if each one is empty, and then enumerate it. But I can't check Model.Count() because wouldn't Model be made of all those objects if I set the page to inheriet from? What are my options? Should I load each content area in a control/partial view? Or can I just dump each object into ViewData and then check the count by casting in the view?
View 2 Replies
Aug 11, 2010
Is it possible to send multiple HTTP requests asynchronously to an ASP.NET web site or any other web server using .NET ? And, then. collect responses from those requests as they come using .NET asynchronous paradigm ? Is it possible ? Or would there still be limit of max 2 HTTP connections from .NET using HTTP ?
View 1 Replies
Jul 13, 2010
I make an asynchronous call from one web service to another web service deployed on different server? The scenario is that an ASP.NET webforms page will call a web service in an async manner. This particular web service will then make another async call to a second web service deployed on different web server. This this possible to achieve, and what additional steps or code would be necessary to make this happen?
View 1 Replies
Mar 9, 2011
I have a repeater like so:
[Code]....
Problem is, I also want to show the viewer the available number of spots in the room. But this requires somehow pull in either the current_occupancy / max_occupancy or in performing a calculation (e.g. max_occupancy - current_occupancy = actual_available) and then returning that with the room.
The end result I'm looking for is to return each room in a button control with text that looks like this:
"Room 1 - 2 Open" "Room 8 - 1 Open" and so on
View 2 Replies
Mar 31, 2011
I'm working on an ASP.net application in which I've multiple web parts in a page. Each web part has its own data source pulling data from them and showing it. When a user tries to load the page I want to load the page instantly and asynchronously render all the web parts with the data.
View 1 Replies
Feb 5, 2010
In my page I would like to load multiple gridview one by one (with or without update panel). Once the page loads I want gridview one to start loading then the next one load and so for the other gridviews.
While the gridview is loading the gridview should show loading gif.
View 1 Replies
Jan 17, 2011
I want to have one datagrid use two different data sources, the two datasaet I use have all the same cloumn names, the only difference is that the come form different databases. I wan tto have the data source be chosen by a dropdown list box. Is this possible or do I have to use two datagrid and just make on invisiable as needed.
View 1 Replies
Sep 20, 2010
I have a gridview which sources information dynamically from database.
Here when i go for the default "AllowSorting" flag equal to true, i am able to achieve sorting of all displayed columns except the textBox control column whose values refreshes to zero.
View 2 Replies
May 2, 2010
I have an update panel in a user control and I am adding multiple instances of it for example 5.
When that update panel refreshes the page load occurs 5 times.
How can I prevent it only for once?
View 3 Replies
Jul 17, 2015
In article Load on demand data in GridView you clearly described. but it's not enough when we comes to conditions.
Is it possible to load data on query method?I want to add some field from other table so how to use inner join in this...
Like I'm having a table with userid and want to get user full name from users table where userId = users.userId
View 1 Replies
Feb 22, 2010
I have several dropdowns on a page that I have named dd1 - dd15. They all have the same data source, so I created a class to get the source and now I need to loop through and load each one. I think I might be close, but could use a push. Here is my class:
[Code]....
Heres my code from my page load event:
[Code]....
View 6 Replies
Mar 3, 2010
I am developing a web application in ASP.NET3.5 with C#. I also using Telerik RadAjax Control. When user click the menu then open the page with a new tab(Like web Browser).I want to create, when user back any previous tab(page) the will be show the previous data without loading 2nd time( like browser tab).
View 4 Replies
Jan 3, 2011
I want to compare two asp.net sources and find different could you introduce me a software inside or outside of visual studio ?
View 3 Replies
Apr 30, 2010
I have an existing asp.net web application I am redesigning to use a service architecture. I have the beginnings of an WCF service which I am able to call and perform functions with no problems. As far as updating data, it all makes sense. For example, I have a button that says Submit Order, it sends the data to the service, which does the processing.
Here's my concern: If I have an ASP.NET page that shows me a list of orders (View Orders page), and at the top I have a bunch of drop down lists for order types, and other search criteria which is populated by querying different tables from the database (lookup tables, etc). I am hoping to eventually completely decouple the web application from the DB, and use data contracts to pass information between the BLL, the SOA, and the web app. With that said, how can I reduce the # of WCF calls needed to load my "View Orders" page? I would need to make 1 call get the list of orders, and 1 call for each drop down list, etc because those are populated by individual functions in my BLL.
Is it good architecture to create a web service method that returns back a specialized data contract that consists of everything you would need to display a View Orders page, in 1 shot? Something like this pseudocode:
public class ViewOrderPageDTO
{
public OrderDTO[] Orders { get; set; }[code].....
Or is it better practice in the page_load event to make 5 or 6 or even 15 individual calls to the SOA to get the data needed to load the page? Therefore, bypassing the need for specialized wcf methods or DTO's that conglomerate other DTO?
View 2 Replies
Sep 16, 2010
if it is possible to read data from a CD and load multiple files from it without actually having to browse for each one through an ASP page. I searched the web and all I can come with is to set however many number of file upload controls onto a page and upload each file individually whereas I am looking to search a directory and upload all files with a certain extension with only one file upload control.
View 6 Replies