Solved

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

Posted on 2011-09-14
1
305 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 500 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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