How can I add something at page level without inserting into the database.
Thanks
Manju

How can I add something at page level without inserting into the database.
Thanks
Manju

DataTable dt,bt;
                DataSet dset = new DataSet();
                dt = dset.Tables.Add("shop");
                bt = new DataTable();               

                dt.Columns.Add("Name", typeof(String));
                dt.Columns.Add("Price", typeof(float));
                dt.Columns.Add("Quantity", typeof(int));
                dt.Columns.Add("Amount", typeof(double));

                bt.Columns.Add("Company",typeof(String));    
                bt.Columns.Add("Model", typeof(String));
                bt.Columns.Add("Insurance Amount", typeof(float));

this is a code snipped ripped off from one of my projects. here i am creating a dynamic dataset and data table to store the values collected form a asp.net form.

Hi

Sorry for not explaining it properly. I have a page for which i use asp.net and ajax and C#. for ex on the page i am trying to add teacher name and other details. And using ajax want to add 10 students for that teacher and their info. The 10 students should not be inserted into the database till all the students and their info is added.

Thanks

Manju

Hi

Sorry for not explaining it properly. I have a page for which i use asp.net and ajax and C#. for ex on the page i am trying to add teacher name and other details. And using ajax want to add 10 students for that teacher and their info. The 10 students should not be inserted into the database till all the students and their info is added.

Thanks

Manju

i haven't worked with ajax. :(

the above code holds good dude in situation where there is no ajax. i.e. there are 10 static form fields from which the data is grabbed when appropriate button action takes place.

you should probably post this in the ajax sections.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.