473,480 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL Server Data base connection in ASP.NET

1 New Member
I am using Visual Web Developer and the form contains two SQLDataSources that are linked to two GridViews.I am trying to link a parameter in the first SQLDataSource component with a field returned by the other SQLDataSource component. Both contains a stored procedure that returns a set of data that has a master/child relationship. I cannot find any obvious way of doing this which is a very simple task on other platforms.
To link a parameter to an input control is trivial but I want the data in the second Griview to show a different set of data depending on the user selection in the first Gridview.

Would be very grateful for any pointers in the right direction.

TCooper.
Feb 23 '07 #1
2 1209
kenobewan
4,871 Recognized Expert Specialist
So you want to use the first datasource in the page load event and populate the first gridview. Then you want to use the event triggered by the user selection to insert as a parameter with your second datasource to create a child gridview. Is this what you are trying to achieve?
Feb 24 '07 #2
rashmitha reddy
6 New Member
HI,

I suppose you wanted to get the data in second grid based on the first datasource.If it is so you can do one thing take a field by which you wanted to get the data in second grid .Go to the template column on your first grid and declare a lable Id of that particular column and add object reference in your code.
For Ex- Label lblId=new Label( );
lblId=(Label)e.items.cells[ No . of that field].findcontrol(lblId);
then bind your second grid for that Id.using your Sp get the required info in your datagrid Itemcommand only.
Feb 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3279
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
4
5634
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
13
2246
by: Edward Mitchell | last post by:
I have a problem that involves the error I receive when attempting to complete the asp.net web application example (Walkthrough: Creating a Web Application Using a Third-Party Business Object). ...
2
5030
by: djamilabouzid | last post by:
Hi! I have some problems with ms sql server database connection. When I wrote the following function (in VB): sub Remplir_Theme() Dim connectionString As String = "Data Source=.\SQLExpress;...
4
3590
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket...
8
1118
by: Omar Abid | last post by:
Hi, I'm Trying to make a program with vb2005express that connect to any Microsft SQL data base and show it's table. I'm having some problems can anyone help me? Omar Abid
3
3246
by: Lee T. Hawkins | last post by:
I am having a number of problems over the last two full days trying to get an ASP.NET 2.0 application to connect to a SQL Server 2005 database... First off, I built this application w/ Visual...
16
4893
by: Omar Abid | last post by:
Hi every body, Im using VB 2005 to create a program that open SQL Data base The problem that i want to detect the tables of a database so how can i know a data base tables instantly Thank you...
10
1514
by: lildiapaz | last post by:
Hi, Everyone I am trying to connect to an SQL 2000 server in c# using a windows application. What I'm trying to do is ask the user to type in the server name and from the user's input take that...
1
5098
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.