?
Solved

Need to fetch information form database table to Vb.NET/ Asp.NEt

Posted on 2011-09-14
1
Medium Priority
?
307 Views
Last Modified: 2012-05-12
Hi,

Two problems:
I have saved all the inforamtion in  a SQL server db table.  Iwant to retrieve the whole information including HTML table , to asp.net page and display  on it as it is. The problem is that I can retrieve on the information all attached togather  with table (tablular information)
There is a psosibly of making  table from scratch , but iti si difficult to separate  information from each and put thenm ni a new table.

Second problem,
This is related with the html table (2*1) stored in database. I am retrieving the information all togather.I want to separate the information of cell 1 (upper cell)  from cell 2 (lowe cell) on aspx page

Soultion urgently required.

0
Comment
Question by:Ammar Iqbal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 2000 total points
ID: 36534909
http://www.developerfusion.com/article/4278/using-adonet-with-sql-server/
http://vb.net-informations.com/ado.net-dataproviders/ado.net-executereader-sqlcommand.htm

Problem 1:

You can bind the datasource into grid. From the grid you can get HTML output:

   StringBuilder sb = new StringBuilder();  
   StringWriter sw = new StringWriter(sb);
   HtmlTextWriter hw = new HtmlTextWriter(sw);  
   gv.RenderControl(hw);    
   return sb.ToString();

If your query output as HTML table then in Javacript (client side) you can use document.write(yourcontent);


Problem 2:

   Better use two queries with semicolon seperated or use SP to return 2 results. I mean multiple result sets then bind them individually.

 Please refer http://vb.net-informations.com/ado.net-dataproviders/ado.net-multiple-result-sets.htm


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question