English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am using asp.net and access. I need to display several product information on the web page..how do i do this?? do i use datagrids, or what?? can someone please help me with this?? i am desperate!!!

2006-08-01 06:43:27 · 4 answers · asked by braich_gal 3 in Computers & Internet Programming & Design

4 answers

you have many options with asp.net

My preference is a datarepeater, but datagrid's work just as well.

Here you go in brief (if you need details email me):

1) Put a datagrid/datarepeater on your page
2) set up your data control to display the neccessary information
3) In the code behiond: Create a conenction to your access database
4) Query for your data and place it in a dataset
5) Set the data control's source to be your dataset
6) call the databind method for your data control.

2006-08-01 06:53:31 · answer #1 · answered by Anonymous · 0 0

I'm using Datagrid to retrieve data from the database.
Fist u place a datagrid on the page.

in the codebehind section u pls follow like this

grdProduct.Datasource = GetProducts();
grdProduct.DataBind();

public static OleDBDataReader GetProducts()
{
OleDBConnection myCon = new OleDBConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
try
{
OleDBCommand cmd = new OleDBCommand("select * from tblProduct",myCon);
cmd.CommandType = CommandType.StoredProcedure;

myCon.Open();
OleDBDataReader Result = cmd.ExecuteReader(CommandBehavior.CloseConnection);
return Result;

}
catch(Exception ex)
{
throw(ex);
}
}


Good Luck

2006-08-01 14:18:20 · answer #2 · answered by anjus 3 · 0 0

aaaaaaaa... such a horrible aplications

2006-08-01 13:48:03 · answer #3 · answered by Mrsashko 5 · 0 0

have no clue

2006-08-01 13:49:28 · answer #4 · answered by anita_delg 2 · 0 0

fedest.com, questions and answers