Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=reporte.csv");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/excel";
Response.TransmitFile(Server.MapPath("~/exportado/reporte.csv"));
Response.End();
martes, 11 de septiembre de 2012
Creating MessageBox using ASP.NET
private void ShowPopUpMsg(string msg)
{
StringBuilder sb = new StringBuilder();
sb.Append("alert('");
sb.Append(msg.Replace("\n", "\\n").Replace("\r", "").Replace("'", "\\'"));
sb.Append("');");
ClientScript.RegisterStartupScript(this.GetType(), "Aviso", sb.ToString(), true);
}
{
StringBuilder sb = new StringBuilder();
sb.Append("alert('");
sb.Append(msg.Replace("\n", "\\n").Replace("\r", "").Replace("'", "\\'"));
sb.Append("');");
ClientScript.RegisterStartupScript(this.GetType(), "Aviso", sb.ToString(), true);
}
martes, 4 de septiembre de 2012
Suscribirse a:
Entradas (Atom)