asp.net - MasterPage textboxes are empty when accessed in code -
I have this website that has masterpieces and some content pages. The masterpage has a div in which I pop up when the user Clicking on the 'Login' link, which is located on the masterpiece, this login form has two text boxes, one for the username and one for the password, and when the user submits the form, they should be authenticated And the truth User information was entered in R All code to handle is behind the masterpages code.
Here's the problem: When clicking on the masterpiece grabs the text from the text box to use in the impression authentication method, the code looks at the text What am I missing? Click here button and form which is located on the master page: buttonclick: and here is the div: These texture names and textexword text properties are empty, although the text contains text. Let me know if you want anything.
bool ISUserAuthenticated = false; String Username = txtUserName.Text; String password = txtPassword.Text; IsUserAuthenticated = masterDataManager.AuthenticateUser (username, password); If (ISUsrrated) {session.ed ("user name", username); LblCurrentUserName.Text = "You are logged in as:" + userName; String script = "& lt; script type = \" text / javascri \ "& gt; $ ('# dialogbox') dialog ('off'); "; If (Page.ClientScript.IsStartupScriptRegistered ("closeDialog")) {Page.RegisterStartupScript ("closeDialog", script); }} Else {lblLoginError.Text = "Username / password combination is not present in the database, please try again."; }
Try moving the updates panel so that the text box can try to post back to you.
When you are using an updated panel, you are generally defining the elements from which you want to post back.
Comments
Post a Comment