Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Call a function for each webform

Call a function for each webform

Scheduled Pinned Locked Moved Visual Basic
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jagmit20
    wrote on last edited by
    #1

    is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.

    D M D 3 Replies Last reply
    0
    • J jagmit20

      is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You get a better response if you ask this question in the ASP.NET forum. AFAIK, there is no event that fires for every request in every session.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      1 Reply Last reply
      0
      • J jagmit20

        is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.

        M Offline
        M Offline
        mr_lasseter
        wrote on last edited by
        #3

        1. Create base page that calls the function. 2. Have all your pages inherit off of the base page.

        Mike Lasseter

        1 Reply Last reply
        0
        • J jagmit20

          is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.

          D Offline
          D Offline
          Dave Sexton
          wrote on last edited by
          #4

          Create the function in a seperate module/class (depending on your requirement) and make the method call at page load, e.g.

          Protected Sub Page_Load....
          Dim MyClass1 As New MyClass 'declare the class
          MyClass.DoFunction() 'do the work
          End Sub

          Is that what you mean? Agree with Dave Kreskowiak - this topic is better off in ASP forum.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups