Results 1 to 3 of 3

Thread: Access to shared sub

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    Access to shared sub

    Guys,

    I have created a user control that I have added to my homepage. The user control (uc_section) contains most of the functionality I need.

    When the user hits a button on the homepage, I am setting the visible property of uc_section to true. However, at this point I would also like to run some code that sits on the user control.

    How can I access these subs from my homepage ? If I set them to Public Shared subs I get lots of errors.

    Cheers
    Bob

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Access to shared sub

    What are the errors? - making the Methods public should allow them to be accessed externally.

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  3. #3
    Hyperactive Member Grunt's Avatar
    Join Date
    Oct 2004
    Location
    Las Vegas
    Posts
    499

    Re: Access to shared sub

    Create a public class, and place the file in the App_Code folder.

Posting Permissions

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



Click Here to Expand Forum to Full Width