Ajax - WebForms Running Multiple Queries At The Same Time?

Aug 24, 2010

We are building a front page/dashboard that queries our database for live statistics. The page has 3 update panels, each update panel has a user control that pulls data for it's box. Lets call the user controls UC_NotStarted, UC_Active and UC_Finished.

We have built the queries that return the data and all of them take a while to run (~7 seconds each). So if we let the first page run with one update panel the image spins for ~21 seconds and display everything. We have broken that code into 3 update panels and set the loading to conditional. When we do this we get one box to load every 7 seconds. That's a step in the right direction but they load sequentially (UC_NotStarted is queried waits 7 seconds and displays, then UC_Active goes for 7 seconds, and finally UC_Finished runs for 7 seconds). We are still at 21 seconds but data is being shown every 7 seconds.

We would like all of the data to be shown in 7 seconds since all of the update panels should be fetching the data at the same time. Instead of using LinqToSQL to pull the data I am now leaning towards web services to get it but not sure if that will work.

View 1 Replies


Similar Messages:

Web Forms :: Single DropDownList Running Multiple Queries?

Jun 16, 2010

I have a drop down with several option. I would like that if a certain item is select then a certain query will run. I read a post that
azamsharp on 12/23/03 .In that post he suggested to do:

string myProcedure = DropDownList.SelectedItem.value.ToString();

SqlCommand myCommand = new SqlCommand("myProcedure",myConnection);

while reading through the post it seems that this wasn't a great idea.

View 15 Replies

Save User Credentials On Server For Running Queries In Background?

Apr 1, 2011

We have an ASP.NET / Silveright web application. The silverlight client displays user specific data in a graphical form - it requests the data from the server: Problem: Getting this data is expensive, due to the underlying database queries that the server has to perform - so the client has to wait... Optimisation Idea: We run the database queries at regular intervals on the server, writing the results to a 'userdata' table in a database 'close' to where the ASP.NET server runs. The process of running the queries and writing the data to the tables is performed by a 'data collection' service, which is separated from the ASP.NET server.

When the client requests data the server retrieves it from a 'userdata' table. This should be nice and quick - we probably have the 'userdata' tables on the same machine as the ASP.NET server. We also have the added benefit that the client sees data even if the underlying database is offline. Of course the data is not live - but all data is potentially old as soon as it reaches the client. So now my Problem: The 'data collection' service needs the user credentials in order to perform these database queries (because each user gets different results for the same query).

How can I store user credentials in a database, in an acceptable 'secure' way? Such that the 'data collection' can impersonate a user to perform the database queries. Our initial scenario is based upon using windows integrated login to the database.

View 1 Replies

Webforms - Attaching Instance MEF Running In ASP.NET?

Apr 20, 2010

I'm trying to do a proof of concept app for my work using ASP.NET WebForms and the Managed Extensibility Framework. I've got things up and running(ish), but I can't seem to figure out how to attach the instance of Visual Studio that has the MEF code in it to the instance of Visual Studio that is running the Web App.

View 1 Replies

Running An MVC 2 RC Web Appilcation With The Majority Of Pages Being Webforms?

Jan 26, 2010

I am running an MVC 2 RC web appilcation with the majority of pages being webforms. (this is an ongoing conversionn to mvc).When people hit our domain at www.mydomain.com, I want the people to get the webform page MyDomainHome.aspx. This is the page specified in IIS as the default document. (I can't convert the home page to controller/view right now because it is very complicated etc.)

I also want the typical "{controller}/{action}/{id}" behavior. Is there a way to mix these together so people who have bookmarked my home page will still get there?

2. Also when I use the "{controller}/{action}/{id}" routing, my pages do not see the css or image folders that are specified in the master page.

View 2 Replies

Iis7 - URL Routing In .Net Webforms Running Under The Classic .NET AppPool?

Dec 29, 2010

Does anybody knows if it is possible to make URL routing in a ASP.Net webforms website that is running under the Classic .NET AppPool.

I've tried a few things here, but it just works when I switch from Classic AppPool to Default AppPool.

** the web site MUST run under Classic AppPool.

View 2 Replies

ADO.NET :: Time Difference In Linq Queries?

Aug 20, 2010

I have my Linq query in which i need to find time difference(not days difference).

The field in database is datetime.

Dim ldtToday
As DateTime = TimeOfDay
Dim SR_RM_InnerJoin =
From SR
In lcntxRT60Entities.RtSReports _
Join RM
In lcntxRT60Entities.RtRMaster
On SR.RtRMaster.ReportID
Equals RM.ReportID _
Select SR, RM _
Where SR.TID = 1 _
And --(Check) SR.ReportDeliveryTime.Value.AddDays(1) < ldtToday

How can i check if the time field of the record is less than current time??

View 5 Replies

Strategy For Handling Variable Time Queries?

Apr 4, 2011

I have a typical scenario that I'm struggling with from a performance standpoint. The user selects a value from a dropdown and clicks a button. A stored procedure takes that value as an input parameter, executes, and returns the results to a grid. For just one of the values ('All'), the query runs for roughly 2.5 minutes. For the rest of the values the query runs less than 1ms.

Obviously, having the user wait for 2.5 minutes just isn't going to fly. So, what are some typical strategies to handle this? Some of my own thoughts:New table that stores the information for the 'All' value and is generated nightlyCache the data on the caching server

View 2 Replies

Multiple Queries With Multiple CheckBoxes

Jan 25, 2010

I am trying to do multiple queries with multiple CheckBoxes. This code worked until just recently, and I didn't make any changes other than adding a single field to my SQL Server DB; field is named 'Crawl'. Now, nothing works! SearchCheckBox.aspx:

[Code]....

SearchCheckBox.aspx.vb

[Code]....

In DesignView, the error reads 'Error Creating control SqlDataSource3' Literal
content ('connectionString="Data Source=EXCEL-4J2W8KYNPSQLEXPRESS;Initial
Catalog=PubCrawls;Integrated Security=True" ProviderName="System.Data.SqlClient"
SelectCommand="SELECT ID,
Pub, Street, Neighborhood, City, State, RelativeAddress, Crawl FROM ListofPubs
WHERE (Neighborhood = @Neighborhood1) OR (Neighborhood = @Neighborhood2) OR
(Neighborhood = @Neighborhood3) _
OR (Neighborhood =
@Neighborhood4) OR (Neighborhood = @Neighborhood5) OR (Neighborhood =
@Neighborhood6) OR (Neighborhood = @Neighborhood7) OR (Neighborhood =
@Neighborhood8) OR (Neighborhood = @Neighborhood9) . . .

goes on like this for a while) is not allowed within a 'System.Web.UI.WebControls.SqlDataSource' This line is highlighted red: connectionString="Data Source=EXCEL-4J2W8KYNPSQLEXPRESS;Initial Catalog=PubCrawls;Integrated Security=True" Finally, there are 19 'Neighborhoods' in my list. There must be a way to loop through the neighborhoods in my SQL statement, right. For Loop or While Loop?

View 3 Replies

SQL Server :: Can Execute Different Queries In A Stored Procedure Same Time

Jan 11, 2011

In my stored procedure there are 8 queries for 8 tables.Each query has joins and sub queries. I am passing parameters & stored procedure name from front end(designed in asp.net 3.5) can we execute that 8 queries at the same time i.e. parallel execution so that I can minimize stored procedure execution time?

View 6 Replies

SQL Server :: Run Multiple MS Update Queries

Sep 11, 2010

On satisfying the If condition, I need to run 2 MS SQL update queries. How can I accomplish this? I am using C# as the server side language.

View 6 Replies

SQL Server :: SUM In Multiple Queries Of Each Table

Dec 21, 2010

I want to find the sum of each tables fileld. how can do this. i tried the following.but could nt get the correct sum. "SELECT SUM(gb) FROM data20 union all SELECT SUM(gb) FROM data10 union all SELECT SUM(gb) FROM data5 union all SELECT SUM(gb) FROM data6"

View 7 Replies

C# - Using Multiple Sql Queries On Single Button Click

Nov 16, 2010

protected void Button2_Click(object sender, EventArgs e)
{
String a = DropDownList1.SelectedItem.Value;
String b = DropDownList3.SelectedItem.Value.PadLeft(3, '0');
String c = TextBox2.Text.PadLeft(5,'0').ToString();
String d = TextBox3.Text.ToString();
String digit = a+ b + c + d;
try
{
myConn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=testcase;User=root;Password=root;Option=3;");
myConn.Open();
//**
string sql = "select * from testcase.main where reg_no =?";
//**
OdbcCommand cmd = new OdbcCommand(sql, myConn);
//**
cmd.Parameters.AddWithValue("?", digit);
MyReader = cmd.ExecuteReader();
//**
while (MyReader.Read())
{
String f = MyReader["pet_name"].ToString();
String g = MyReader["res_name"].ToString();
Label9.Visible = true;
Label9.Text = f;
Label10.Visible = true;
Label10.Text = "VS";
//Label11.Visible = true;
Label11.Text = g;
}
MyReader.Close();
}
catch (Exception e1)
{
Response.Write(e1.ToString());
}
finally
{
if (MyReader != null && !MyReader.IsClosed)
{
MyReader.Close();
}
if (myConn != null && myConn.State == ConnectionState.Open)
{
myConn.Close();
}
}

I want to add another sql query which is using two tables to fetch the data and than i want to display it in a dropdownlist after fetching data from database. How should i proceed?? Should i create a totally new connection? I tried many different ways like, creating new connection and new reader and entire try and catch block i coded again but on running the website i t was taking very long to load the contents. What i did i modified only this portion(below code) and used the entire try catch again but it dint work.

while (MyReader1.Read())
{
String f = MyReader1["ret"].ToString();
DropDownList1.Items.Add(f);
}

View 2 Replies

C# - Linq To Sql - Executing Multiple Queries On The Same Transaction?

Nov 2, 2010

I am creating entries in a contract table using linq to sql.

One column needs to conditionally be assigned an application number from a range of values.

I'd like to simply increment the max existing value, however it is a multi-user application and I'm concerned about multiple contracts receiving the same app number if they happen too close together.

Is there a way to either force the entire thing to use the same transaction, or to execute both during the same submit?

View 4 Replies

Configuration :: How Many App Domain Created When Multiple Instance Of Multiple Application Is Running On Single

Jan 12, 2011

below written question :

1.) What is the name of the OS process in which App Domain resides.

2.)if suppose There are Three Windows application hosted on a same envoirment and two instance is working for each application at a Time, means now total instance are six .what will happen among the below written cases :

a.) There will be six different app domain in a single OS process

b.) There will three app domain(one for each application) in a single OS process and some Parallel thread will be executed in each app domain for another instance.

c.) There will be Three OS process corresponding to each application.

3.) If eveything will remain same except there are three web application in place of windows in point 2, will there be any change in functioning.

View 1 Replies

SQL Server :: Run Multiple Queries On Single Button Click

Jan 29, 2011

how to run multiple queries on a single button click. Actually I want whatever a user write in text box and click the button the text would get inserted in table category and also a table name project should get updated. I am using Sql server 2005 and c#

View 2 Replies

Web Forms :: How To Write Multiple Queries On A Single Button Click

Jan 27, 2011

Is it possible to write multiple queries on a single button click? if yes then how?

View 5 Replies

Forms Data Controls :: Display Multiple Queries In Repeater

Apr 20, 2010

i want to display results from multiple queries in a repeater... is it possible? for example, a user searches for a keyword "test" i search 4 different databases for it, and display results from all 4 in one repeater.

View 2 Replies

Forms Data Controls :: Multiple Queries 1 Gridview, Updatable?

Aug 2, 2010

in VB, exactly how would you show only 1 gridview for this type of page example, where a user can fill in multiple options for searching:

Enter first and last name
_______firstname
_______lastname

[code]...

View 2 Replies

DataSource Controls :: LINQ To SQL - Multiple Queries Doesn't Return Any Results

May 25, 2010

I am working on asp.net 3.5 and in MVC using Linq to SQL classes. In my MVC project i am calling stored procedure using linq to sql that conatin query joining two tables.Below is my code in Partial class

[
Function(Name="dbo.GetUserWiseThreadDetail_SP")]
[ResultType(typeof(Thread))]
[ResultType(typeof(Reply))]
public
IMultipleResults GetUserWiseThreadDetail_SP([Parameter(DbType="VarChar(30)")]
string userID)
{
ExecuteResult result = this.ExecuteMethodCall(this,
(MethodInfo)(MethodInfo.GetCurrentMethod())), userID);
return ((IMultipleResults)(result.ReturnValue));
}

In one of the controller i have made one more class

public class
MypostIndexData
{
public
IEnumerable<Thread> Thrds {
get;
set; }
public
IEnumerable<Reply> Repls {
get;
set; }
public MypostIndexData(IEnumerable<Thread>
thrds,IEnumerable<Reply> repls)
{
this.Thrds=thrds;this.Repls=repls;
}
}

finally coding of controller action method

ForumDataContext pmforum = new
PMForumDataContext();
public
ActionResult MyPosts(string userId)
{
IEnumerable<Thread>thrds;
IEnumerable<Reply>repls;
IMultipleResults result = pmforum.GetUserWiseThreadDetail_SP(userId); (this satement doesnot give any result,if i execute stored proc in
sql it give the results)
thrds = result.GetResult<Thread>();
List<Thread> thrdlist =
new
List<Thread>(thrds);
repls = result.GetResult<Reply>();
List<Reply> replylist;
if (repls !=
null)
{
replylist = new
List<Reply>(repls);
}
return View(new
MypostIndexData(thrds,repls));

I am unable to understand why i am not getting any results?

View 5 Replies

AJAX :: Multiple Gridviews With Toggle Button Extenders - Only One Works At A Time?

Jun 29, 2010

I've got a page with 3 gridviews (well more than 3 but 3 main ones) on it, each includes a template field which uses a ToggleButtonExtender to display images instead of checkboxes. Each one works fine on it's own but if the index is changed on any of the gridviews the images stop displaying on the others

View 4 Replies

DataSource Controls :: Return Number Of Rows Affected For Multiple Queries In One SQLCommand?

Feb 22, 2010

I am accepting query/queries from user (our support team) in a text box where user can enter only one query or multiple queries. I need to display result of all queries entered in the textbox. If it is SELECT statement then result of that statement in grid which is done. If UPDATE/INSERT/DELETE then total number of rows affected which is also done but if only one UPDATE/INSERT/DELETE statement is entered in the textbox.

If user enters 2 UPDATE statements and then a SELECT statement then how can I get number of rows affected for individual UPDATE statements just like SQL Server Qury Analyzer displays messages in its result pane.

e.g.

(6 row(s) affected) -- first UPDATE statement

(4 row(s) affected) -- second UPDATE statement

(16 row(s) affected) -- for SELECT statement (grid will also be displayed along with these messages).

I tried almost everything, SqlDataSource (returns count of first statement only), SqlCommand.ExecuteNonQuery and DataAdapter.Fill (returns count of last statement only).

View 3 Replies

Webforms - Multiple Domain URL Routing In 4?

Jan 12, 2011

Can Asp.Net 4 Webforms handle url routing for differing domain names?

Ex.

www.abc.com
www.admin.abc.com
www.domainname.com
www.admin.domainname.com

I would like to make a single app to handle the requests coming from the above URLs.Most of the scenarios I have found point to having url routing based on a single domain and multiple web pages.

View 1 Replies

C# - Add Multiple Controls To Panel In Webforms?

Feb 17, 2011

I would like to be able to add multiple label controls to a panel and display them on an onlick event. The code I have does what I want it to the first time, then the label is simple replaced with a new label on the second onlick event and so on.

Here is what I have so far:

private void createTaskLabel(Guid GoalID, string Goal)
{
Label taskLabel = new Label();
taskLabel.ID = GoalID.ToString();
taskLabel.Text = Goal.ToString();
TaskPanel.Controls.Add(taskLabel);
}

So, for instance, this creates a new label with a uniqueID (handled elsewhere) and places it within the panel and displays it. When the onlick fires again, the same label is simply replaced instead of a new one appearing below it.

View 2 Replies

Configuration :: WebForms Routing In 4.0 Multiple Parameters?

Oct 18, 2010

Simple enough I have a search feature I am wanting to impliment Routing for.Here is the routing table for it.

[Code]....

Now I want to set the postback URL for a linkbutton to go to the search page with all parameters filled in but the last one or for that matter any one of the parameters to be left blank

[Code]....

You will see in this example I left the very last one blank. Now when I do that the link does not work. If I fill in all attributes it does workso can anyone tell me how to work around this issue?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved