473,657 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1501
Curtis Rutland
3,256 Recognized Expert Specialist
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 Recognized Expert Moderator Expert
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
4251
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 second form when it is called. Both forms are .htm files that call themselves when the submit button is press via the following command in each form: <form method="post" action="<?php $server?>">
2
4583
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 on the link and it would open a web page. The URL contained in the hyperlink would pass the name and address field
3
1577
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 answer is to populate the ddl in "if !is postback" which i did. When i debug it seems that before the postback all values are lost. When i tried to do the same on my local machine (localhost) everything works fine. Can someone please help
3
1218
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 object, but on my button event being reached the object is now empty. private Visitor VisitorObj = new Visitor(); protected Label label1; private void Page_Load(object sender, System.EventArgs e) {
0
1724
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 procedures in that database. The user can select any of those stored procedures by clicking on checkboxes; after submitting their selections, a script to delete and then re-create each stored procedure will be generated. Now I'm trying to do...
3
15986
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 links or pointers? i've already tried google - but all i get is ActiveX methods which work in a very few cases.
2
2309
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 form uploads to a database (the following code does this) 2. An e-mail is sent to my sales team as well as the customer, which contains the form values . 3. I want the user to then be directed automatically to another webpage, after they hit the...
4
1943
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 values entered on page before the user called page B, are lost. I "think" I read somewhere that to preserve the values, I save use Cookies. Is that correct? Is there any other way? Thanks....
2
1661
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 method. If any field is blank then script will say fill all the fields, then redirect to the registration page itself, During this process when redirecting to registration page i should get the existing values which i typed already.
0
8394
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.