473,412 Members | 4,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

How to get the values from the database into an html page using C# .net

Hi All,

I am using a html page and in that page i have to get the values from the database.

My total application is written in asp.net with c#

only this page is html page

I am not getting how to get the values from the data base (sql server 2005) to the html page. I have to display the values in that page.

how can i achive this ?

Its a very urgent need for me . please help me out

can anyone solve my problem

Thanks in Advance,
Anand
Jun 30 '08 #1
2 1484
Curtis Rutland
3,256 Expert 2GB
Well, you could create another ASP.NET page. In the Page_Load method, you can connect to your DB, retrieve your results, and Response.Write() them as text or xml. Then Response.End();

You can call this page using the XmlHttpRequest javascript object. You can even POST and GET to the asp.net page, so you can set it up to return different results based on the query string you pass it.
Jun 30 '08 #2
Frinavale
9,735 Expert Mod 8TB
HTML pages display static content.

Web pages that display information retrieved from a database do not display static content...they display dynamic content. You require Server side code to create these dynamic pages.

This means that you need to create an ASP.NET web application (or web site) with C# code supporting it.

Once you've got the project created, check out the article on how to use a database in your program.

Cheers,

-Frinny
Jun 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
2
by: Gordon Hudson | last post by:
Hello Here is what I am trying to do: Make a hyperlink on a data entry form with its URL built from the values for fields in that entry on the database. So, I would go to record 65785 click...
3
by: Ron Wallegie | last post by:
I developed a webesite using c#. I have a dropdownlist wich is filled with database values. When i click on a button on the same page all values are lost in the dropdownlist. The most common...
3
by: MattC | last post by:
I have created a container class and instantiated it in one of my pages. I fill the object on page load when not on a postback. On a button click i want to do somethign with the values in that...
0
by: deathtospam | last post by:
A few weeks ago, I created a Classic ASP page that connects to a machine with SQL Server installed on it, prompts the user to select a database on that server, then lists all of user-created stored...
3
by: toffee | last post by:
Hi all, I got a pre-formatted spreadsheet. would it be possible using js to copy the data from a table on the current webpage, open the spreadsheet and paste the content ? if so, anyone got any...
2
by: sindhudixit | last post by:
Hey, I am having a user fill out a form then the fields are going to uploaded to my database. So, at this point, when the user hits the submit button I want three things to happen: 1. The...
4
by: Bruce A. Julseth | last post by:
Page A is an input data page. Before all the data input is complete, a user might have to call an intermediate page B. After completing page B, page B will return the user to A. The problem. The...
2
by: phpmagesh | last post by:
Hi to all, I am creating a registration page, like name, last name, Date of birth, ph number, address etc.. When i click submit button all the values are taking to validation page using POST...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.