thanks for reply..... I have created datatable and that field are added into gridview.
jadhavShubhangi
Posts
-
gridview rows stored in database -
gridview rows stored in databasehi........... I have a gridview and button.When click on button then all gridview rows inserted into database.how to do this? please help me..... thank u.
-
gridview rows stored in databasehi........... I have a gridview and button.When click on button then all gridview rows inserted into database.how to do this? please help me..... thank u.
-
converting gridview to excel in asp.netyes, I tried this one.
-
converting gridview to excel in asp.netthanx it works as it is I previously return code for this........
-
converting gridview to excel in asp.net -
converting gridview to excel in asp.nethi i am using following code to export gridview to excel..but the generated excel file does not contain rows and columns as normal excel file ... can any on e suggest a solution for that here is my code StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); String savefile = heading; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + savefile + ".xls"); HttpContext.Current.Response.Charset = ""; gv.RenderControl(htw); HttpContext.Current.Response.Write(sw.ToString()); HttpContext.Current.Response.End();
-
export gridview to excel in asp.netthanks for reply
-
export gridview to excel in asp.netthanks for reply This excel sheet is not regular format like rows and columns only show gridview. Thanks
-
export gridview to excel in asp.nethi............. I have written following the code for export gridview to excel in asp.net protected void btnExcel_Click(object sender, EventArgs e) { string attachment = "attachment; filename=GridViewExport.xls"; Response.ClearContent(); Response.AddHeader("content-disposition", attachment); Response.ContentType = "application/ms-excel"; StringWriter sWriter = new StringWriter(); HtmlTextWriter htwWriter = new HtmlTextWriter(sWriter); gvCustomer.RenderControl(htwWriter); Response.Write(sWriter.ToString()); Response.End(); } It gives gridview in excel but not a normal excel file.......... how to do this.......... pls someone help me....... thnaks a lot
-
how to retrieve values in a textbox according to the selected value in the dropdownlist in Web applicationthanks for reply..
-
how to retrieve values in a textbox according to the selected value in the dropdownlist in Web applicationhello......... I am new in asp.net.I have given dropdownlist and bind data to this one.If I am selecting the value in dropdownlist according their values display into textbox how to do this? I have written the code is private void LoadDropdown() { tblItemDetails1TableAdapter l_tblItemDetails1TableAdapter = new tblItemDetails1TableAdapter(); DataTable l_tblItemTable = l_tblItemDetails1TableAdapter.GetData(); dropItemName.DataTextField = "ItemName"; dropItemName.DataValueField = "ItemId"; dropItemName.DataSource = l_tblItemTable; } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { LoadCombo(); } } Pls help me.......... Thanks.
-
display progress barI written the code : this.progressBar1.Location = new System.Drawing.Point(88, 232); this.progressBar1.Name = "progressBar1"; this.progressBar1.TabIndex = 0; this.progressBar1.Maximum = 10000; this.progressBar1.Minimum = 1; this.progressBar1.Step = 1; for (int i = progressBar1.Minimum; i <= progressBar1.Maximum; i++) { progressBar1.PerformStep(); } I write this code in pageload it go infinite loop. plz help me.........
-
connection problemThanks a lot....... this will run but their is an another error is 1.a field initializer can not reference the non static field ,method,property,"EmpDetails.form.conString" code is: string conString = ConfigurationManager.ConnectionStrings["Employee.Properties.Settings.EmpdetailsConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(conString);
-
click on dtagridview display result in relative textboxhi......... the code is con.ConnectionString = "Data Source=SPARK1\\SQLEXPRESS;Initial Catalog=Empdetails;Integrated security=true"; con.Open(); //int p = Convert.ToInt32(dataGridView1.SelectedRows); String s = "Select * from Empdetails where EmpId="; SqlCommand cmd = new SqlCommand(s, con); SqlDataReader dr = cmd.ExecuteReader(); //dataGridView1.DataSource = dr; //GridView1.DataBind(); while (dr.Read()) { txtempid.Text = dr.GetInt32(0).ToString(); txtname.Text = dr.GetValue(1).ToString(); txtaddress.Text = dr.GetValue(2).ToString(); combodes.Text = dr.GetValue(3).ToString(); txtphno.Text = dr.GetInt32(4).ToString(); } dr.Close(); cmd.ExecuteNonQuery(); con.Close();
-
display progress barhi..... i want a progress bar while loading the page in windows application C#. plz give me the code.
-
connection problemhi......... i have written code in windows application as follows app.config program.cs string conString = ConfigurationManager.ConnectionStrings["Employee.Properties.Settings.EmpdetailsConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(conString); but it gives error like 1. The name ConfigurationManager Des not exist. pls help me.......
-
displaying updated datagridviewhi....... I have display datagridview.Pls give me the code of ,when i insert the record into database at that time displaying updated datgridview.
-
click on dtagridview display result in relative textboxhi........ the code is con.ConnectionString = "Data Source=SPARK1\\SQLEXPRESS;Initial Catalog=Empdetails;Integrated security=true"; con.Open(); //int p = Convert.ToInt32(dataGridView1.SelectedRows); String s = "Select * from Empdetails where EmpId="; SqlCommand cmd = new SqlCommand(s, con); SqlDataReader dr = cmd.ExecuteReader(); //dataGridView1.DataSource = dr; //GridView1.DataBind(); while (dr.Read()) { txtempid.Text = dr.GetInt32(0).ToString(); txtname.Text = dr.GetValue(1).ToString(); txtaddress.Text = dr.GetValue(2).ToString(); combodes.Text = dr.GetValue(3).ToString(); txtphno.Text = dr.GetInt32(4).ToString(); } dr.Close(); cmd.ExecuteNonQuery(); con.Close(); }