- Jun 6, 2003
- 6,448
- 0
- 0
I am working on creating a set of custom controls that will authenticate users of a website. I currently have three controls in mind:
1. Login form ? control that inherits from webcontrol that merely renders the login textboxes (username and password) and submit button.
2. Authentication ? control that takes variables from the login form control and checks the user's login credentials.
3. Error output ? control that inherits from webcontrol and renders any error messages for the page (validation messages, etc.)
Although I have used custom controls in the past, I am at a loss on how to link these controls in the following manner:
1. User enters credentials into login form and hits submit button.
2. Login form control passes user credentials to the authentication control.
3. If there is an error with the user credentials, authentication control passes an error message to the error output control.
Obviously, doing this from codebehind is straightforward, as the custom control variables can be set programmatically (WebControl1.ForeColor = ?Red?).
So, I guess in simplified terms, how to I set the variables for a custom control on a page from within another custom control? I couldn?t find anything of Google, most likely because I don?t know the correct terms to search for, so I hope someone here can point me in the right direction.
1. Login form ? control that inherits from webcontrol that merely renders the login textboxes (username and password) and submit button.
2. Authentication ? control that takes variables from the login form control and checks the user's login credentials.
3. Error output ? control that inherits from webcontrol and renders any error messages for the page (validation messages, etc.)
Although I have used custom controls in the past, I am at a loss on how to link these controls in the following manner:
1. User enters credentials into login form and hits submit button.
2. Login form control passes user credentials to the authentication control.
3. If there is an error with the user credentials, authentication control passes an error message to the error output control.
Obviously, doing this from codebehind is straightforward, as the custom control variables can be set programmatically (WebControl1.ForeColor = ?Red?).
So, I guess in simplified terms, how to I set the variables for a custom control on a page from within another custom control? I couldn?t find anything of Google, most likely because I don?t know the correct terms to search for, so I hope someone here can point me in the right direction.