Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 157157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:27:15+00:00 2026-05-11T10:27:15+00:00

I have a number of extension methods defined in my current project. It is

  • 0

I have a number of extension methods defined in my current project. It is a VB.NET project. I have no problem using these methods inside files that are in the App_Code directory, this is the same place that I defined the methods. However, in my page.aspx.vb code behind page these methods are not showing up. I have tried including the correct namespace, with no luck.

Does anyone have an idea as to why I can’t call an extension method in a code behind file?

Defined in the App_Code folder

<Extension()> _ Public Function GetSelected(ByVal apps As List(Of Appointment)) As Appointment     Dim selected = From a In apps _                    Where a.Selected = True      Return selected.Single End Function 

Defined in the App_Code folder, inside another class(this one works just fine)

Public ReadOnly Property Selected() As Appointment     Get         Return _appointments.GetSelected()     End Get End Property 

Defined in the App Root folder, inside a code behind file(Not working)

Public ReadOnly Property Selected() As Appointment     Get         Return _appointments.GetSelected()     End Get End Property 

They are all in the same application, no external references. And When I build the project there are no errors, until I try to use the extension method in the code behind. At that point the error is ‘GetSelected’ is not a member of ‘System.Collections.Generic.List(Of Appointment)’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:27:16+00:00Added an answer on May 11, 2026 at 10:27 am

    Make sure your module is marked Public.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a number of jsp files under web-inf folder. Inside my web.xml i
I have a class that modifies data via some extension methods. In order to
I have a class with a large number of init... methods (UITableViewCell). My extension
I'm working on a project were we have number (5 at the moment) of
I have a number of files stored under res/raw . E.g.: yeh_vidhi_mangal.txt om_jai_mahavir.txt tumse_laagi_lagan.txt
I have a number of code value tables that contain a code and a
I have a number of Data Transfer Objects (DTO's) that map onto data structures
I have a class that I have to call one or two methods a
I created an extension method that uses the built-in ASP.NET serializer to serialize my
I have written a function that gets a given number of random records from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.