Solved

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

Posted on 2011-09-14
1
264 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
1 Comment
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now