using System; namespace C_TRACK.WebUserControls { /// /// Struct x richiesta serializzata/deserializzata /// public struct qrRequest { public string valore; } public partial class mod_userCards : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } public string getImgUrl(object codOpr) { string answ = ""; #if false //string targetUrl = string.Format(@"ctrack.steamware.net/elet-scal/jumper?USER_NAME=info@elettronicascalvina.it&UserAuthkey=asdfbqhewrqg7802345bhasdfg78&CodOpr="); //targetUrl = HttpUtility.UrlEncode(targetUrl); // genero obj qrRequest richiesta = new qrRequest(); richiesta.valore = answ; // ora serializzo oggetto! answ = JsonConvert.SerializeObject(richiesta); #endif string targetUrl = "CTRACK_ELET_SCAL"; answ = string.Format(@"https://qrcode.steamware.net/Home/QR_site/{0}?val={1}", targetUrl, codOpr); //answ = string.Format(@"http://localhost:59543//Home/QR_site/{0}?val={1}", targetUrl, codOpr); return answ; } } }