Question
I got almost everything to work but I can not enter any text in the Login or Password boxes. Would you please look at my
I got almost everything to work but I can not enter any text in the Login or Password boxes. Would you please look at my code and help me. Thank You, GOD Bless.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace _15._8LoginUserControl { public partial class LoginForm : Form { public LoginForm() { InitializeComponent(); }
private void btnLogin_Click(object sender, EventArgs e) { string uName = loginPasswordUserControl1.Logon; string pWord = loginPasswordUserControl1.Password; string btnLogin = "User Name:" + uName + " Password is:" + pWord; MessageBox.Show(btnLogin, "Info",MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
----------------------------------------------------------
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace _15._8LoginUserControl { public partial class LoginPasswordUserControl : UserControl { public string Logon { get { return tbLogin.Text.Trim(); } } public string Password { get { return tbPassword.Text.Trim(); } }
private void tbLogin_TextChanged(object sender, EventArgs e) {
} public LoginPasswordUserControl() { InitializeComponent(); } } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started