Results 1 to 3 of 3

Thread: Single Page_Load Event

  1. #1

    Thread Starter
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Single Page_Load Event

    I would like to populate my drop down lists with data only once. I put the code in the Page_Load event. It looks like the Page_Load event is being kicked off every time I change index in one of my drop down lists. Is there another event I should be using?

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: Single Page_Load Event

    Code:
    if(!IsPostBack) BindDDL();
    Magiaus

    If I helped give me some points.

  3. #3
    Addicted Member nickname's Avatar
    Join Date
    Sep 2004
    Location
    Europe - Belgium
    Posts
    170

    Re: Single Page_Load Event

    Hello..

    I'm having a simular problem.. I have code that I only want to run ONCE..

    I have this code
    Code:
    Protected Sub Page_Load(....) Handles Me.Load
    
            If (Not IsPostBack) Then
    
                Me.txtTest.Visible = True
                Me.txtTest.Text = "test"
    
            End If
    
    End Sub
    When I load the page it doesn't do anything.. Whe I press a button it fills my txt with "test", and after that it works fine..

    It will run ONCE, but after a click.. But I want it to run on the load of the page..

    Why doesn't it work?

    thanks in advance!

    nickname
    Software Engineer
    DBA
    Webdesigner
    --
    to code or to be coded, that's the question

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