erreur est quelque chose comme ça: alt text http://i020.radikal.ru/1005/76/e94bd2f2c61f.jpgImpossible d'envoyer le fichier à partir de l'application Web sur Internet Explorer
Impossible de charger Items.aspx de 192.168.0.172
Et un texte ne peut pas ouvrir ce site Internet. Il ne peut pas être trouvé. Essayez plus tard
code:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Charset = System.Text.Encoding.Unicode.EncodingName;
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Unicode;
HttpContext.Current.Response.BinaryWrite(System.Text.Encoding.Unicode.GetPreamble());
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader(
"content-disposition", string.Format(
"attachment; filename={0}",fileName));
....
table.RenderControl(htw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
Problème avec ce fichier est uniquement pour Internet Explorer (fonctionne sur l'opéra/FireFox ...)
Et donc cela fonctionne pour HTML sans
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
cette chaîne
Comment éviter cette erreur sur IE?
la peine était sur SSL) mais aussi aidé> _
Cynede