...

View Full Version : getting procedure from module



lorraine
05-30-2011, 09:59 AM
i have a module named modConn, and I have a procedure inside named Retrieve.



Module modConn
Public Sub Retrieve(ByVal code As String)
'my code goes here
End Sub


I'm trying to use that procedure in my index.aspx.vb like this:


Public Partial Class index
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Retrieve("VB")
End Sub

End Class

but it won't work. the page said:



Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Retrieve' is not declared.


I declared it! it is right there. infact, i'm able to access procedure retrieve in my header.master.vb, so why it would not work on index.aspx.vb?
Any ideas? Thanks.

alykins
05-30-2011, 06:11 PM
is your Module modConn embedded in a private?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum