Mar 29, 2010, 2:46 PM
[CLOSED] [1.0] DirectEvents in Usercontrols
Question for the experts, I need to call a direct-method for a loaded user control thats on the user-control code-behind. When I click the button on the user-control that's loaded it gives me an error saying it can't find the button.
Example (I kind of need this answered in a hurry, I appreciate it, thanks!)
This loads the window
RecoverPassword is the name of the button on the UserControl Page.
The control with ID 'ctl20_RecoverPassword' not found
Example (I kind of need this answered in a hurry, I appreciate it, thanks!)
This loads the window
Public Sub btnForgotPassword_Click(ByVal sender As Object, ByVal e As DirectEventArgs)
Dim window As New Ext.Net.Window()
window.Closable = "true"
window.Icon = Icon.Help
window.Width = "378"
window.AutoHeight = True
window.Resizable = False
window.Draggable = False
window.ID = "wForgotPassword"
window.Title = "Recover Forgotten Oracle Password"
window.Modal = "true"
window.Center()
' here you have to load required user control
window.ContentControls.Add(LoadControl("Usercontrols/wForgotPassword/wForgotPassword.ascx"))
form1.Controls.Add(window)
window.Render()
End Sub
The standard button on the usercontrol is just calling a directevent in codebehind.Public Sub Recover(ByVal sender As Object, ByVal e As DirectEventArgs)
Dim RecoverPass As String = ResetPassword(tForgotUsername.Text, cPassword.SelectedItem.Text)
End Sub
I think it's something where it's just not registering the controls to the ResourceManager?RecoverPassword is the name of the button on the UserControl Page.
The control with ID 'ctl20_RecoverPassword' not found
Last edited by geoffrey.mcgill; Jul 15, 2010 at 6:35 AM.
Reason: formatting