using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using ETS_Data; namespace ETS_WS.WebUserControls { public partial class mod_clipboard : System.Web.UI.UserControl { /// /// UID formattato con "_" /// public string uid { get { // fix brutale: nelle pagine master c'è un ctl00_ iniziale di troppo... return this.UniqueID.Replace("$", "_").Replace("ctl00_", "").Replace("ctl01_", ""); } } protected void Page_Load(object sender, EventArgs e) { ClientScriptManager script = Page.ClientScript; if (!script.IsClientScriptBlockRegistered(this.GetType(), "clipboard")) { string fullScript = ""; script.RegisterClientScriptBlock(this.GetType(), "clipboard", fullScript); } if (!script.IsClientScriptBlockRegistered(this.GetType(), uid + "_clip")) { string fullScript = string.Format("", text4copy, text4btn); script.RegisterClientScriptBlock(this.GetType(), uid + "_clip", fullScript); } } /// /// testo da passare a clipboard /// public string text4copy { get { return utils.obj.StringSessionObj(string.Format("{0}_text4copy", uid)); } set { utils.obj.setSessionVal(string.Format("{0}_text4copy", uid), value); } } /// /// testo x button /// public string text4btn { get { return utils.obj.StringSessionObj(string.Format("{0}_text4btn", uid)); } set { utils.obj.setSessionVal(string.Format("{0}_text4btn", uid), value); } } } }