Calling sub procedure in MasterPage file

S

Steven K

Hello,

In my codebehind file, I am trying to call a sub procedure that is in my
MasterPage, but I am getting an error:

Error 1: BC30451: Name 'LoadMenu' is not declared.
c:\inetpub\wwwroot\price_insx\MenuCode.aspx.vb 19

----
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Me.Load

If Not IsPostBack Then
Call LoadMenu("Hello World")
End If

End Sub
---

In my MasterPage:

Public Sub LoadMenu(ByVal strText As String)
Response.Write(strText)
End Sub

Any help with this would be appreciated.
 
K

Karl

Say your master page is called "Primary.master"
you could do

ctype(Master, Primary_master).LoadMenu

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top