Tag: HowTo

[HowTo] Write Excel file to web page (aspx)

Writing an Excel file to the response object in ASP.NET is quite easy… This piece of code works with most of the files type… string YourFilename = “test.xlsx”; string path = Server.MapPath(YourPath + YourFilename); Response.ClearContent(); Response.AddHeader(“content-disposition”, “attachement;filename=” + YourFilename); // Ouvrir avec MSExcel Response.ContentType = “application/ms-excel”; // MSWord // Response.ContentType = “application/msword”; // Text // […]

[HowTo] Use jQuery with Aspx UpdatePanel (datepicker Sample code inside)

As the update panel is going to reload the contents of the html. You’ll have to listen for the UpdatePanel to complete and recreate the datepicker. Here is a very basic sample. This doesn’t take into account multiple update panels on your page or potential memory leaks from not properly destroying your datepicker. Another thing […]

Android : HowTo Sauvegarde de l’état de l’application

Comme précisé plus haut, Android détruit votre vue en cas de changement d’orientation pour construire la nouvelle vue. Donc vous voulez peut être sauvegarder des données avant le changement d’orientation, par exemple si l’utilisateur a commencé à saisir du texte. Pour résoudre ce problème, il suffit d’utiliser la méthode onSaveInstanceState(). Cette méthode est appelée à […]