Good day everyone i am working on a project on asp.net webform. i am using a template that has an already made table so i want to collect the table to the database so it can fetch out all the information and send it to the table.
- StringBuilder table = new StringBuilder();
- protected void Page_Load(object sender, EventArgs e)
- {
- if(!Page.IsPostBack)
- {
- SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\odt\Documents\login.mdf;Integrated Security=True;Connect Timeout=30");
- ;
- con.Open();
- SqlCommand cmd = new SqlCommand();
- cmd.CommandText = "select * from [log] ";
- cmd.Connection = con;
- SqlDataReader dt = cmd.ExecuteReader();
- if (dt.HasRows)
- {
- if (dt.Read())
- {
- }
- }
- // cmd.ExecuteNonQuery();
- con.Close();
- }
this is the html table
- <div class="box-body table-responsive no-padding">
- <table ID="tdb" class="table table-hover" >
- <tr>
- <th>IDth>
- <th>Userth>
- <th>Passwordth>
Manoj BhoirPosted May 6, 2019, 12:59 AM
Oladotun ObileyePosted May 5, 2019, 4:14 PM
Anoop Kumar SharmaPosted May 4, 2019, 1:45 AM
Nilesh SawardekarPosted May 4, 2019, 1:41 AM