0

hi this is my connection string

       SqlConnection conn = new SqlConnection("Data Source=RAVI-PC\\SQLEXPRESS;Initial Catalog=personals;User ID=sa;password=sa;Integrated Security=True");
        SqlDataAdapter da = new SqlDataAdapter(" select * from table_2", conn);
        DataSet ds = new DataSet();
        da.Fill(ds, "table_1");
        conn.Open();

Actually my doubt is how to insert(data entered in texbox) and delete and update view record from asp.net sql database . I searched on google but i cannt understand its very difficult so post simplest coding .i attached my web application . thaks asp.net_

Attachments asp.net_.JPG 75.32 KB
3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by nuevoenjava
0

use asp.net Grid view control which has all the predefined functionalities(Which you require) like selecting the record, adding the record, updating the record and removing the record with out writing any code behind

0

In the toolbox section look for sqldatasource. Drag it to your form and create the select statement in it. once the sql datasource is created bind it to a gridview control. if you click the sql datasource and select properties you could set up insert query update command and delete all in it. Then you could use the textboxes in your insert statement using the textbox as a control parameter for ex (@textbox) and so on.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.