Suryakavitha
Suryakavitha

Reputation: 1411

Display Registration details in Website from Database

i am using a website application for registration, in that application i have inserted contols like label boxes and text boxes... And i stored these values in database...

now i have to display the details only without controls in seperate form and the details should take from that database...

How Shall i Do this?

The output should display in next form... the format is

Name:Jessy RollNo:6315 City:ParkTown

Thanks In Advance

Upvotes: 0

Views: 505

Answers (4)

Manish
Manish

Reputation: 6286

Ok...the simplest way....

Read the data from database from code behind and use Response.Write() to show the data on the page...

Example:

            Response.Write("<table border=2>");
            Response.Write("<th>Id</th><th>Name</th>");
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                Response.Write("<tr>");
                    Response.Write("<td>");
                    Response.Write(row[0].ToString());
                    Response.Write("</td>");
                    Response.Write("<td>");
                    Response.Write(row[1].ToString());
                    Response.Write("</td>");
                Response.Write("</tr>");
            }
            Response.Write("</table>");

Upvotes: 1

Raja
Raja

Reputation: 3618

I think if you just want to display that information then you can use Divs or Spans or just labels. Get the information from Database and load that information into label.

Hope this helps.

Thanks, Raja

Upvotes: 0

Atul Yadav
Atul Yadav

Reputation: 496

You should get registration details from database with the help of ADO.net and then u display these details on the separate form. you can show the data in datagrid also.

This link helps u

http://msdn.microsoft.com/en-us/library/dw70f090.aspx

Upvotes: 0

Roberto Aloi
Roberto Aloi

Reputation: 30985

You might want to have a look to the data access tutorials page.

Upvotes: 0

Related Questions