Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2011
    Location
    Philippines
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    getting procedure from module

    i have a module named modConn, and I have a procedure inside named Retrieve.

    Code:
    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:
    Code:
    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:

    Code:
    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.

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,925
    Thanks
    46
    Thanked 203 Times in 202 Posts
    is your Module modConn embedded in a private?

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •