G
grist2mill
I want to create a standard tool bar that appears on all pages that is
a control. The toolbar has a button 'New'. What I wolud like when the
user clicks on 'New' depends on the page they are on. I would like to
do this by defining a NewFunc() that is different in each
(code-behind) page which is called by the standard 'New' button in the
toolbar.
How can I get this to work? So far I have the following (which doesnt
work). When the user clicks 'New', I would like it to call NewFunc()
as defined on the current page that is presenting the user control.
Private Sub lbtNew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles lbtSearch.Click
lblMessage.Text = MyClass.Page.NewFunc()
'lblMessage.Text = MyClass.Parent.Page.NewFunc()
'lblMessage.Text = MyBase.Page.NewFunc()
End Sub
(in the above example, NewFunc simply returns a string to be displayed
on a label control on the toolbar)
Any suggestions appreciated.
regards
John
a control. The toolbar has a button 'New'. What I wolud like when the
user clicks on 'New' depends on the page they are on. I would like to
do this by defining a NewFunc() that is different in each
(code-behind) page which is called by the standard 'New' button in the
toolbar.
How can I get this to work? So far I have the following (which doesnt
work). When the user clicks 'New', I would like it to call NewFunc()
as defined on the current page that is presenting the user control.
Private Sub lbtNew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles lbtSearch.Click
lblMessage.Text = MyClass.Page.NewFunc()
'lblMessage.Text = MyClass.Parent.Page.NewFunc()
'lblMessage.Text = MyBase.Page.NewFunc()
End Sub
(in the above example, NewFunc simply returns a string to be displayed
on a label control on the toolbar)
Any suggestions appreciated.
regards
John