Results 1 to 2 of 2

Thread: Calling procedure in code-behing from <% ... %>

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Calling procedure in code-behing from <% ... %>

    I was wondering if its possible to call a procedure from the code-behind section of an aspx file from inside the <%...%> part.
    I know I can use labels and stuff and have them run at the server, but is it possible to do this :

    Code:
    '' code behind
    ''
    Function strDoSomething() As String
        Return "test"
    End Function
    
    
    '' other part
    ''
    <html><title>hello!</title><body>
    <%
        Response.Write(strDoSomething())
    %>
    </body></html>

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Yep, i'd like to write a longer answer but can't really expand on: Yep it works.

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