Read specific cell in sql, using the rows id to choose it with

nickalev

New Member
I have a table in my sql database, that comtains data.In this table, I have the id (int), and two two column names (each nvarchar(50) ).Now. Say. Using C# in codebehind, I want to place one of the "nvarchar" in a string.I wish to use the id from my browsers url, to choose the data with.Lets say, my url is "http://localhost:49530/Forum/Thread.aspx?id=4"In my table, I have ThreadID, Topic and Message.So it needs to write the data from "Topic", that has ThreadID=4, into a predefined variable.I wish to do it in page_load in code behind. And finally show that data in a label on the aspx page.I am totally blank. (as well as what to google for. Have googled the whole day on this).
 
Back
Top