public partial class userprofile : UserControl { private string count1; public string Countt { get { return count1; } set { count1 = value; } } public userprofile() { InitializeComponent(); } SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\odt\Documents\Loanapp.mdf;Integrated Security=True;Connect Timeout=30"); DataTable dt = new DataTable(); private void profile_Load(object sender, EventArgs e) { int count = ((DataTable)this.dtuserpro.DataSource).Rows.Count; lblcount.Text = count.ToString(); Countt = lblcount.Text; } private void dashboard_Load(object sender, EventArgs e) { userprofile up = new userprofile(); metroLabel1.Text = up.Countt; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)