Results 1 to 2 of 2

Thread: page load event

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    page load event

    in the codebehind page I placed some code to fill my combo box, sorry that was 6.0 talk, my dropdownlist. Heres the code I'm using and it's the only code I have in the page load event.

    Me.DropDownList1.Items.Add(New ListItem("Database1", "D"))
    Me.DropDownList1.Items.Add(New ListItem("Database2", "P")

    When I run my page I get double data in my dropdownlist from each line of code. I went into debug mode and it is in fact going through the code twice. It's goes to the end sub and then goes back to page_load and runs the same code again. Any reason why it's going through this procedure twice?

    thanks,
    eye

  2. #2
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    Try setting autoeventwireup=false in the page declaration.

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