Populate gridview in asp.net ajax
-
Hi i have written this code to populate gridview in asp.net ajax but it doesn't give me any error or populate my gridview so i can figure out what is a problem.my database does't have password it have only user id which i provided. here is my code string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa"; SqlConnection conCustomer = new SqlConnection(conString); SqlCommand cmdCustomer = new SqlCommand(); SqlDataAdapter daCustomer = new SqlDataAdapter(); DataSet dsCustomer = new DataSet(); cmdCustomer.Connection = conCustomer; daCustomer.SelectCommand = cmdCustomer; cmdCustomer.CommandText = "SELECT * FROM CustomerDetails"; daCustomer.Fill(dsCustomer); GridView1.DataSource = dsCustomer; GridView1.DataBind(); conCustomer.Close();
Mamphekgo
-
Hi i have written this code to populate gridview in asp.net ajax but it doesn't give me any error or populate my gridview so i can figure out what is a problem.my database does't have password it have only user id which i provided. here is my code string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa"; SqlConnection conCustomer = new SqlConnection(conString); SqlCommand cmdCustomer = new SqlCommand(); SqlDataAdapter daCustomer = new SqlDataAdapter(); DataSet dsCustomer = new DataSet(); cmdCustomer.Connection = conCustomer; daCustomer.SelectCommand = cmdCustomer; cmdCustomer.CommandText = "SELECT * FROM CustomerDetails"; daCustomer.Fill(dsCustomer); GridView1.DataSource = dsCustomer; GridView1.DataBind(); conCustomer.Close();
Mamphekgo
-
Hi i have written this code to populate gridview in asp.net ajax but it doesn't give me any error or populate my gridview so i can figure out what is a problem.my database does't have password it have only user id which i provided. here is my code string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa"; SqlConnection conCustomer = new SqlConnection(conString); SqlCommand cmdCustomer = new SqlCommand(); SqlDataAdapter daCustomer = new SqlDataAdapter(); DataSet dsCustomer = new DataSet(); cmdCustomer.Connection = conCustomer; daCustomer.SelectCommand = cmdCustomer; cmdCustomer.CommandText = "SELECT * FROM CustomerDetails"; daCustomer.Fill(dsCustomer); GridView1.DataSource = dsCustomer; GridView1.DataBind(); conCustomer.Close();
Mamphekgo
If does not have any password then leave the password field blank. Like: string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa; Password=";
Naresh Patel
-
use update panel from the ajaxextensions. then create a trigger control for the grid to load.
Bharath.S Ron
i have update panel. can you please give me a clue of how to do it
Mamphekgo
-
If does not have any password then leave the password field blank. Like: string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa; Password=";
Naresh Patel
Hi it now gives me this error format of the initialization string does not conform to specification starting at index 59
Mamphekgo
-
Hi it now gives me this error format of the initialization string does not conform to specification starting at index 59
Mamphekgo
-
Have you initialized the triggers properly???
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
go to the properties int the update panel and create trigger for loading the grid. for example if your loading the grid on click of the button then create trgger for that button click even . it will populate the grid
Bharath.S Ron