web stats analysis

Archive for November, 2012

CKEditor not working on server

CKEditor would not run on server

CKEditor not working on arvixe hosting server

CKEditor works on my Local but Not Work on Server

Solution

Remove  .htaccess  file from CKEditor folder

 

 

Exporting Data from grid view to Excel file in asp.net

How to export Data from grid view to Excel file in asp.net

Solution

Type Following Code for export Data from grid view to Excel file in asp.net

Default.aspx

<asp:Button ID=”Button1″ Text=”Export to Excelsheet” runat=”server”
Width=”150px” OnClick=”Button1_Click” />

 

Default.aspx.cs

protected void Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader(“content-disposition”, “attachment;filename=Export.xls”);
Response.Charset = “”;
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = “application/vnd.xls”;
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
dgexcel.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}

 

Note : dgexcel is a grid view id

 

 

 

 

date and time picker example in asp.net

how to set date to datetimepicker in c#

date with time picker in asp.net

Open following link

http://www.javascriptkit.com/script/script2/tengcalendar.shtml

and download it.