I am very new to ASP.NET, so I apologize for the naive question, but I'm just wondering how I can get the data from the stored procedure that I'm calling from ASP.NET. The stored procedure should return a single row, and I want to get the returned record fields.
So this is what I still came up with
Stored procedure
ALTER PROCEDURE dbo.StoredProcedure6
@LoginName varchar(50)
AS
SELECT username ,Password FROM dbo.Users
Where username = @LoginName
RETURN
Code for accessing a specific entry in the asp.net.cs file
var user = dbcontext.returnuserdetails(txtEmailAddress.Text);
where returnuserdetails is the function that I added through the model browser in Visual Studio 2010
Now the question is, how to get and save the values of the returned username and password?
I work in ASP.NET 4.0 if that helps.
thank
source
share