✅ Error in login form c# code
I'm larning C# and WinForms right now and I tried to make a login form. I've seen many people use this parameter txtSth.Text; but for me it says it does not exist in the current context. (I've attached my code and the error message)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1147135206374002688/Screenshot_2023-09-01_144433.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1147135206696960091/Screenshot_2023-09-01_144514.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1147135207066062848/Screenshot_2023-09-01_144423.png)
6 Replies
Have you added controls to your form and named them
txtName
and txtPass
? Also, if you're sending code try to $codegif insteadah i see i had to name the controls
yea it works now thanks
🙂 cool, maybe try and dig a bit deeper into what you're seeing online rather than just copying it without understanding!
$close
Use the /close command to mark a forum thread as answered
will do thanks