tips & tricks


Calendario
dicembre 2024
lmmgvsd
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

Serialize Object to string

Serialize Object to string public static string Serialize(object o, Type T) { //this avoids xml document declaration XmlWriterSettings settings = new XmlWriterSettings() { Indent = false, OmitXmlDeclaration = true }; var stream = new MemoryStream(); using (XmlWriter xw = XmlWriter.Create(stream, settings)) { //this avoids xml namespace declarati 
Leggi tutto il post...
Categoria: C#
martedì, 23 gen 2018 Ore. 12.07

Sql Function Return varchar

Sql Function Return varcharCREATE FUNCTION SchemaName.GetValuesCommaSeparated(   @Id int)RETURNS varchar(100) -- or whatever length you needASBEGIN   declare @values as varchar(100)declare @result as varchar(100) ='' DECLARE cursorValues CURSOR FOR       select T.ColumnName from SchemaName.TableName T  where T.ID = @Id --OPEN CURSOR. OPEN cursorValues  --FETCH THE RECORD INTO THE VARIABLES. FETCH NEXT FROM cursorValues INTO @values 
Leggi tutto il post...
Categoria: Transact SQL
mercoledì, 10 gen 2018 Ore. 10.33

BACKUP DATABASE

BACKUP AND RESTORE sintaxBACKUP DATABASE [dbname] TO  DISK = N'D:\Database\Backup\20180102_dbname.bak' WITH  COPY_ONLY, NOFORMAT, INIT,  NAME = N'dbname-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10GOdeclare @backupSetId as intselect @backupSetId = position from msdb..backupset where database_name=N'dbname' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'dbname' )if @backupSetId is null begin raiserror(N'Verify failed. Ba 
Leggi tutto il post...
Categoria: SQLServer
martedì, 09 gen 2018 Ore. 11.19

Install Util

Installare un servizio WindowsC:\Windows\Microsoft.NET\Framework64\v4.0.30319>installutil  /ServiceName="Service_Test" "C:\Program Files\Test\Services\Service.exe"installutil /u /ServiceName="Service_Test" "C:\Program Files\Test\Services\Service.exe" 
Leggi tutto il post...
Categoria: Command
martedì, 02 gen 2018 Ore. 14.45

Download file from Aspx page

   Download file from Aspx page    protected void Download(byte[] zipBytes)    {        System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;        string fileName = "tracciati.zip";        response.ContentType = "binary/octet-stream";        response.AddHeader("Content-Type", "binary/octet-stream");        response.AddHeader("Content-Dispositio 
Leggi tutto il post...
Categoria: ASP.NET
martedì, 02 gen 2018 Ore. 12.46

Html report generated by SqlServer query in Html div

View Html report generated by SqlServer query in Html divfunction callServerProfileView(IDProfile, idOpUnit) {                $.ajax({                    type: "POST",                    url: GetAppPath() + "/WebServices/Profile/ProfileServices.asmx/GetProfileFromID",                    data: "{idProfile:'" + 
Leggi tutto il post...
Categoria: Jscript
martedì, 02 gen 2018 Ore. 12.23
Archivio Posts
Anno 2020

Anno 2018

Anno 2015

Anno 2013

Anno 2011

Anno 2010

Anno 2009

Anno 2008
Statistiche
  • Views Home Page: 15.070
  • Views Posts: 58.204
  • Views Gallerie: 2.837
  • n° Posts: 117
  • n° Commenti: 1
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003