Click here to Skip to main content
15,922,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have these tables
SCHOOL- (SchoolID,SchoolName,City,Phone, Description)
PROGRAM- (ProgramID, ProgramName)
COURSE-(CouseID,CourseName)
SCHOOL_PROGRAM_COUSRE - (CourseID,SchoolID,ProgramID,CourseFee,SchoolCourseName)
CATEGORY - (CategoryID,CategoryName)

Now i want to display-
SchoolName
CourseName
CourseFee
CategoryName

I have already made stored procedure, now just want to show these values as a output on different "LABELS" or in "textboxes". how to do that ?

Thanks.
Posted

Hi,
if your stored procedure is returning multiple record i.e multiple school names, you can go for GridView with labels or Texboxes as item templates. Or if your procedure returning only one record then you can use 4 individual labels or textboxes.

check this.
http://msdn.microsoft.com/en-us/library/aa479353.aspx[^]

http://www.asp.net/web-forms/tutorials/data-access/custom-formatting/using-templatefields-in-the-gridview-control-cs[^]
 
Share this answer
 
Comments
VJ Reddy 19-Apr-12 0:03am    
Good answer. 5!
Karthik Harve 19-Apr-12 3:18am    
Thanks.
nidhi30 19-Apr-12 0:19am    
Thanks :)
The question is not tagged with either Windows Forms or ASP.NET and it could not be made out from the question also.

The Solution 1 given by Karthik Harve is good for ASP.NET.

For Windows Forms DataGridView control can be used for displaying the results.
A tutorial is given here
C# DataGridView Tutorial[^]
 
Share this answer
 
Comments
nidhi30 19-Apr-12 0:21am    
Thanks :) Its with ASP.NET
Now its working. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900