code behind doubt

Results 1 to 3 of 3

Thread: code behind doubt

  1. #1
    Join Date
    Dec 1969

    Default code behind doubt

    hi,<BR><BR>I am using code behind to develop a web page.<BR>Is it possible to compile my entire vb file to "dll" and use "subs&#039; and "functions" in aspx file. <BR><BR>I can able to create my controls and used it in my aspx page. But could not find how to use the "functions" and "subs" in vb page.<BR><BR>How exactly to do that. Where I can find resource(articles) for this.<BR><BR>Thanks in advance.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Declare subs and functions as "Public"

    In your codebehind page, declare subs and functions as "Public".<BR><BR><BR>Public Function MyFunction() As String<BR> MyFunction = "Hello World"<BR>End Function<BR><BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Or protected...

    Since the ASPX page is derived from the VB code-behind file (or C# code-behind file, if you&#039;re using the "preferred language" =) you can declare your functions as protected so that other pages can&#039;t get at the functions that are meant specifically for that page.

Posting Permissions

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