I\'m creating a login system in asp.net and C# programming language. The code behind to handle the user and password is done. But in view layer, I\'m troubling to get the va
This is because these controls are parts of a template. They are not directly on the page, they are added there dynamically when Login control is initialized. To access them you need FindControl:
string user = ((TextBox)Login1.FindControl("UserName")).Text;