How to write a database value to a table in table formateRJRaghavendra Joshi12yAsked May 12, 2014, 3:16 AM EDT3 answersShareLinkedInXCopy linkSaveHi,I want to write a html table dynamically from a console application which has to fetch data from a sql database table and format as a table.
How to write a database value to a table in table formateRJRaghavendra Joshi12yAsked May 12, 2014, 3:16 AM EDT3 answersShareLinkedInXCopy linkSaveHi,I want to write a html table dynamically from a console application which has to fetch data from a sql database table and format as a table.
sudipta sanyalRank #1,945 · 753 reputation12y agoPosted May 12, 2014, 9:46 PM EDT0CREATE TABLE #temp_table (eid INT IDENTITY(1,1),ename NVARCHAR(200),esalary float,dep_id INT)INSERT INTO #temp_table VALUES ('Abhi',5000,1)INSERT INTO #temp_table VALUES ('Bala',8000,1)INSERT INTO #temp_table VALUES ('Chithra',6000,1)INSERT INTO #temp_table VALUES ('Chithra1',60001,1)INSERT INTO #temp_table VALUES ('Chithra2',60002,1)INSERT INTO #temp_table VALUES ('Chithra3',60003,1)INSERT INTO #temp_table VALUES ('Chithra4',60004,1)DECLARE @strHtml NVARCHAR(MAX)SET @strHtml = ''SELECT @strHtml = ''SELECT @strHtml = @strHtml + '' + CONVERT(VARCHAR(20),eid) + '' + ename + '' + CONVERT(VARCHAR(20),esalary) +''FROM #temp_tableSELECT @strHtml = @strHtml + ''SELECT @strHtmlDROP TABLE #temp_table0Jignesh TrivediRank #16 · 50.3K reputation12y agoPosted May 13, 2014, 1:35 AM EDT0hi,Please refer below link it might help you.http://www.derektrauger.com/Blog/tabid/59/articleType/ArticleView/articleId/58/Converting_a_DataTable_into_HTML_Using_C.aspx0SsamantaRank #3,157 · 454 reputation12y agoPosted May 13, 2014, 1:48 AM EDT0http://forums.asp.net/t/1780118.aspx?How+to+bind+records+into+HTML+table+instead+of+Grid0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputation12y agoPosted May 13, 2014, 1:35 AM EDT0hi,Please refer below link it might help you.http://www.derektrauger.com/Blog/tabid/59/articleType/ArticleView/articleId/58/Converting_a_DataTable_into_HTML_Using_C.aspx0
SsamantaRank #3,157 · 454 reputation12y agoPosted May 13, 2014, 1:48 AM EDT0http://forums.asp.net/t/1780118.aspx?How+to+bind+records+into+HTML+table+instead+of+Grid0
sudipta sanyalRank #1,945 · 753 reputationPosted May 12, 2014, 9:46 PM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted May 13, 2014, 1:35 AM EDT
Please refer below link it might help you.
http://www.derektrauger.com/Blog/tabid/59/articleType/ArticleView/articleId/58/Converting_a_DataTable_into_HTML_Using_C.aspx
samantaRank #3,157 · 454 reputationPosted May 13, 2014, 1:48 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts