DataSource Controls :: Combining Multiple Requests Into One?

Apr 8, 2010

Ok I hope I can describe this clearly. This is all demo code nothing in production.Right now I have a stored procedure that is

[Code]....

This will return only one row as ID is uniquethen I have a procedure that gets all the colors that are available for this model number and i use that data in a drop down list, it is like this

[Code]....

this can return multiple rows with different colors.Right now i am opening a connection getting the product data, consuming that to properties of a class, then to get the data from the Colors I open another connection run the procedure with the model parameter being the model returned from the first sproc and bind that to my ddl.I want to do this in one connection and just get two result sets back. So how do I set the parameter of the second procedure to be the model from the first?

View 8 Replies


Similar Messages:

DataSource Controls :: Combining Two Parameters To One Column?

Jan 21, 2010

Is it possible in SqlDatasource Update command to combine two parameters to make a third?

[Code]....

this is what I need to do Combine First and Last names with a space between.

View 4 Replies

DataSource Controls :: Combining Insert And Select Statements?

Jun 10, 2010

[Code]....

I want to insert a record into a log table ONLY if one exact copy already doesn't exist within ten days, what is a good way to do in one stored procedure what I do above in two?

View 3 Replies

DataSource Controls :: Combining Two Queries - Count For Each City As Whole

Feb 4, 2010

I know there has to be a way to do this but for some reason I keep getting it wrong. I have one query which pulls all of the cities from a zipcode database like so:

[Code]....

Then I have another which counts the records from a transactions table per city, like so:

[Code]....

Only the zipcode is stored in the transactions table, so the idea here is to get a list off all the distinct cities that reside in the state. Once I have the cities, I want a count for each city as a whole, so I need to go back in and get all of the zipcodes that make up one city, and then count the transactions for those zipcodes. It works using the first query above, looping through them and then executing the second for every pass. But shouldn't there be a way to do it all in one query?

View 4 Replies

DataSource Controls :: Combining Date And Time From Separate Datetime Variables In Insert Sql?

Jun 29, 2010

I'm trying to combine a date and time from separate variables in my asp.net insert sql. pointers? I'm getting the following error

Conversion failed when converting date and/or time from character string.

[Code]....

View 2 Replies

DataSource Controls :: Create A Multi Column Listbox By Combining Fields In Linq Select Statement

Jan 11, 2010

I am trying to create a multi column listbox by combining fields in Linq select statement, as Let Name = Last + First. The problem is how to pad the Last column with spaces as you would in SQL using REPLICATE so when I bind the listbox to the data, it looks like two columns.

View 5 Replies

JavaScript - Multiple Create Requests Means Multiple Button Click Events For The Same Time?

Oct 19, 2010

I have a form which inserts data in DB on Submit button click but the problem is when client click the button multiple times its sends multiple create requests means multiple button click events for the same time of same data, which must not be.

I tried to disable the button when client click the Submit button first time but after this it does not call server click event handler or not fire the server click event once it got disabled.

How to handle this multiple click problem..

I used the following code to disable the button

[code]....

View 3 Replies

C# - Multiple Asp Requests From Multiple Clients Share Information?

Dec 9, 2010

Imagine a website where individual clients can see each-other's presence - like a social network or a chatroom.

For example:

Client1 connects to my website.The back-end C# code updates a static field to indicate Client1's presence.
Client2 connects to my website.Will the back-end C# code for the second request see the information stored in the static field from the first request? Is there anything I need to do to guarantee that these seperate instances of my ASP application are sharing static data?

View 4 Replies

C# - Combining Multiple Fields In C# Dynamic Data Foreign Key Display?

Sep 30, 2010

I have two tables (Person and Location) In the Dynamic Data Site, when adding Location info, I am need to choose a person from the dropdown box which is populated via a FK. That dropdown box defaults to the field in "Person" that is titled "fname" which is first name, so it looks like "Jim" or "Steve".

I'm trying to have that dropdown box display the full name of the person it references which would be combining the fields fname and lname.

Would I do this inside a Field Template? Metadata? I'm kind of stuck on this.

If I look at the FieldTemplate for ForeignKey_Edit I see this:

[code]...

and it seems like I should be able to make something similar to "PopulateListControl" and use that instead, but I have no idea where this method even resides.

View 1 Replies

DataSource Controls :: Control Outbound IP Address Used In Network Requests?

Jan 28, 2010

Is there a way to control the Outbound IP Address a .NET program uses?

We have Servers with multiple IP Addresses hosted at Data Centers with limited Firewall rules. We would like to open Port 1433 to our SQL Server to as few individual IP Adresses as possible. But this becomes difficult when a Server has multiple IP Addresses.

So is there a way to control what Outbound IP Address a .NET program uses? ...Even better would be if there's a way to control the Outbound IP Address in the connection string.

View 2 Replies

How To Test Multiple Web Requests To Web Server

Mar 17, 2011

I am using asp.net and I would like to test a few hundreds concurrent requests to the same page, and get a result. I don't need it via browser. Just a tool that sends requests and prints the result Is there such tool?

View 2 Replies

How To Persist A Model Across Multiple Requests In MVC 2

Jan 3, 2011

I'm building a web application that has a particular model representing some events. Users need to be able to add N number of people to a given event. Choosing people is handled by a partial view.

I'm trying to build a menu that displays when users click "add a person" to the event. Because the event hasn't been filled out completely yet, there is nothing in the database to persist between requests.

I also have validation logic on the event page.

My proposed solution is to add the form to search or add for people on the event form itself and have a submit button that sends the values that have been added back to the server, where I can store them in ViewData or Session.

Unfortunately, doing this flags the validation.

My second solution is to load a partial view responsible for loading the UI to add/search for a person. I could add a little code on the method in the controller that returns a partial view storing the existing data in a session variable or viewdata. Trouble is, I have to submit the form to do it--again tripping the validation!

I'm wondering if perhaps I chose the wrong tool to do this...because in webforms, there would probably be a postback and you would just perform an operation on that postback. I'd like to avoid rewriting the application in webforms and am wondering if there are ways I'm overlooking in ASP.NET MVC.

View 1 Replies

Sending Multiple HTTP Requests Asynchronously Using .NET

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

Security :: .Net Windows Authentication, Multiple Log In Requests?

Mar 16, 2010

I have a small project I am working on using web developer express, and I am trying to get windows authentication to work with my intranet website project. This website is only to be accessed inside my LAN and not from the internet at all, so I figured windows authentication would be best.What happens when I turn it on (and I've tested this from multiple browsers: IE8, Firefox, Chrome, Safari) is that the website asks the user to log in (via pop up textbox). Not only does it request the user to log in (which I don't think it should, since the login is based on windows authentication and I am on a windows machine already logged into the internal domain) but it requests the user to login multiple times, sometimes I get asked to log in and type in the same username/password combination 12 different times. It seems to me that the asp page is requesting permission to view each individual element and requires authentication to load one object (like an image or text box).

I am severely annoyed. :( I just wanted authentication to work smoothly without any login requests, or at the mostone request.

View 1 Replies

Web Forms :: Best Practice For Handling Multiple Requests At The Same Time?

Jul 8, 2010

we have this web service that sends JSON code to an iPhone application.

Each time the app makes a request, the web serice accesses the database, grabs corresponding xml data, transforms it to JSON code and then sends it back to the app.

the xml data gets updated approximately every minute, you can assimiliate this process with a sport app of which you can watch live game commentaries.

Now the iPhone app is going to implement a refresh button which a user can proactivly hit it against the service to fetch the latest data.

So we need to implement something that is capable of handling multiple requests that could occur at the same time or in a very short period of time.

View 3 Replies

WCF / ASMX :: Do Multiple WCF Web Service Requests Queue Up Or Do They Run In Parallel

Mar 17, 2011

I've got a WCF web service that runs fine at the moment but there is talk about using it very heavily soon. As part of it's normal process it writes a file out, then reads it back in again (don't ask why, I know it's stupid). I'm concerned that if we start hitting it with lots of requests then the following might happen.

1. Request 1 writes the file out.

2. Request 2 comes in and overwrites the file.

3. Request 1 reads the file back in but this is now the wrong file.

My understanding is that the requests would naturally queue up so that request 2 wouldn't start until request 1 had finished, but I'm not totally sure.

View 1 Replies

C# - MVC HTML.AntiForgeryToken() With Multiple AJAX Requests From One Page?

Mar 8, 2011

I'm creating a page that makes multiple AJAX form posts without a page refresh.

I would like to use the ASP.NET MVC HTML.AntiForgeryToken() helper to secure the form against CSRF attacks. I think that each form on the page can share the same token, but will it allow multiple requests with the same token? If not is there a way to get a new token or some other way to secure the forms?

View 2 Replies

HttpContext.Current.Items Reused Across Multiple Http Requests?

Jan 27, 2011

I'm using HttpContext.Current.Items to make a Per-Request Cache Store. I'm hitting to many Cache entries over different http requests.

It seems that HttpContext.Current.Items is reused across multiple http requests. Is it normal?

View 2 Replies

DataSource Controls :: How To Create Multiple Records In A Dataset From Multiple Databases

Mar 7, 2011

I am trying to design my logic to do this but I want to create a dataSet which will have records from several databases, The records all have the same layout.

I am reagin the connection string paths from a table in a database.

I am asking for your help in trying figure out my logic.

Should I use the connectionString builder in conjunction with a loop to Connect, read a record into a dataset Until therer are no more records to be read from my databse table with the database name/paths tables ?

Here is my beginning code which deals with one database:

[Code]....

View 2 Replies

DataSource Controls :: Multiple Result Sets Vs Multiple Data Readers?

Jun 4, 2010

Would it be better to have a sp return multiple result sets and use NextResult() or have subsequent call to dr.execute.... () and hadle one result at a time?

To me using nextResult() on a multiresult datareader would be cleaner and easier - but it does not seem to be very "atomized". I guess I am wondering can the cost of executing multiple commands be neglected? Seems like executing multiple commands and receiving a single result set would also be easier to read/test/understand.

View 1 Replies

Selectively Redirecting HTTP Requests To HTTPS Requests?

Jun 18, 2010

What's the simplest and most effective way to selectively redirect HTTP requests to your ASP.NET page to its HTTPS equivalent? For example, if my page site URL is [URL], I want to redirect some (or all) page requests to [URL] What's the easiest way to do that?

View 2 Replies

Forms Data Controls :: Combining Two Charts Using MS-Chart 3.5?

Jun 6, 2010

I'm trying to combine two charts ( Column & Spline ) using MS Charts 3.5. When i run the page the second series of the Spline chart is not visble/working.

Here is the code

string connectionString2 = "server='myserver'; user id='testuser'; password= est'; database='DBs'";
System.Data.SqlClient.SqlConnection sqlConnection2 = new System.Data.SqlClient.SqlConnection(connectionString2);
string queryString2 = "SELECT TOP 10 NAME, VOLUME, CLOSE FROM Com WHERE NAME IN ('LEAD')";

[Code].....

View 2 Replies

Forms Data Controls :: Combining FirstName And LastName From Table

Feb 6, 2010

I have a Customer Table that has many fields - two of which are FirstName and LastName.

I have a TyapedDataSet that is is linked to the CustomerTable

I have BusinessLogic layer that looks at the Typed DataSet

On my page I have an objectdatasource back to the BusinessLogicLayer and a dropdownlist

Currently, the dropdownlist displays the LastName and has a value set to CustomerID.

I want the display to be LastName+', '+FirstName instead of LastName

My question is where do I create the field called FullName - Do I open the MS SQL table and add a field called FullName -- but I think if I do this then when I add data I have to duplicate FirstName and LastName info. Do I add a field (column) to the dataset?

View 7 Replies

DataSource Controls :: LINQDataSource Multiple WhereParameter?

Mar 23, 2011

I am trying to program the where prameters for this in code behind in C#, and is there really no way to do more than one parameter? Or am I not understanding this correctly? It seems only the 2nd parameter gets executed, no matter which one is at begining. I debug and seems they both get executed fine, but my listview doesn't get filtered and instead only the 2nd paramter works. Look at my code:

Also, if I do myLinq.Where = "division ==1 and someotherInt = 2", it works fine, but if I do two different data types, it will throw error. Since I want to filter with two different data types, hwo do I do this?

Parameter pram1 = new Parameter();
pram1.Name = "division";
pram1.DbType = DbType.Int32;

[code]...

View 20 Replies

DataSource Controls :: Multiple Inserts With LinqDataSource?

Sep 4, 2010

I'm having a question about the LinqDataSource. Does anyone know if it's possible to perform multiple inserts with the LinqDataSource? Let's say for example that I have 2 tables.

Table A
AID = PK autoincrement Name AddressA FK AddressB FK
Table B
BID = PK autoincrementStreetNumberPostalCodeCountry

These tables are just examples to clarify my question. Let's say that I have a FormView with a LinqDataSource where the user can enter his name en a billing address (A) en delivery address (B). Now I would like to know if the LinqDataSource is able to insert 2 records in table B and use these ID's to insert them in table A together with the name?

View 2 Replies







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