public override string Text to public string xTextand obviously renamed all the references to "Text", and the "get" was correctly called only once, does anyone know why this should happen ? the functional code for the uc is shown below
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; namespace CMSUserControls { public partial class CMSUpdateDateTextBox : UserControl { public CMSUpdateDateTextBox() { InitializeComponent(); this.xText = null; } private void btnUpdate_Click(object sender, EventArgs e) { this.xText = DateTime.Now.ToString("dd-MM-yy"); } public string xText { get { DateTime dt; string s = null; try { dt = DateTime.Parse(this.dtPicker.Text); s = dt.ToString("yyyyMMdd"); } catch { } return s; } set { this.dtPicker.Text = value; } } } }