I created stored procedure for retrieve data by Id in sql server
- Create procedure [dbo].Retrievebyid(@ID int) as begin
- select [Name],
- [Manufacturer],
- [Model]
- from HardwareDbTable where AssetID=@ID end
Now goto visual studio create project and take web-aplication in that added ADO.NET EntityModel.
And i try to call that SP but i don't know how do it.
- Entities db = new Entities();
- void Edit()
- {
- str = Convert.ToInt16(Request.QueryString["id"]);
- db.Edit_Hwdb(ID: str);
- Edit_Hwdb_Result dbb = new Edit_Hwdb_Result();
- TextBox1.Text = dbb.AssetName;
- TextBox2.Text = dbb.Manufacturer;
- TextBox3.Text = dbb.Model;
- }
but its not retieving any data.

Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 4, 2018, 3:32 AM EDT
Eswar Datta109 reputationPosted Sep 4, 2018, 3:36 AM EDT
Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 4, 2018, 3:38 AM EDT
Eswar Datta109 reputationPosted Sep 4, 2018, 3:41 AM EDT
Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 4, 2018, 3:48 AM EDT
are you getting my point?
Eswar Datta109 reputationPosted Sep 4, 2018, 3:55 AM EDT
Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 4, 2018, 9:23 PM EDT
Eswar Datta109 reputationPosted Sep 4, 2018, 11:41 PM EDT