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. Web Development
  3. ASP.NET
  4. Which control genrate the PostBack?

Which control genrate the PostBack?

Scheduled Pinned Locked Moved ASP.NET
wpfwcfquestion
5 Posts 2 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.
  • T Offline
    T Offline
    tomer dror
    wrote on last edited by
    #1

    Hi, My custom webcontrol contains two buttons, both genrates PostBack. on the Page_Load event i am binding the control to a data source,but i need to do it only when user press the first butto. in the Page_Load event is it possible to now which button genrate the PostBack? BTW:The "button" are LinkButton and Button thanks in advance.

    L 1 Reply Last reply
    0
    • T tomer dror

      Hi, My custom webcontrol contains two buttons, both genrates PostBack. on the Page_Load event i am binding the control to a data source,but i need to do it only when user press the first butto. in the Page_Load event is it possible to now which button genrate the PostBack? BTW:The "button" are LinkButton and Button thanks in advance.

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Thats what the OnClick events are used for :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02

      T 1 Reply Last reply
      0
      • L leppie

        Thats what the OnClick events are used for :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02

        T Offline
        T Offline
        tomer dror
        wrote on last edited by
        #3

        Thanks, as far as i know the Page_Load called before the OnClick and it is cause me problem. i am binding the control to a data source in the Page_Load event(just like i saw in many examples),sometimes when the user press a specific button,i dont need to bind the control,but on the OnClick event it is too late isn't it? thanks. tomer

        L 1 Reply Last reply
        0
        • T tomer dror

          Thanks, as far as i know the Page_Load called before the OnClick and it is cause me problem. i am binding the control to a data source in the Page_Load event(just like i saw in many examples),sometimes when the user press a specific button,i dont need to bind the control,but on the OnClick event it is too late isn't it? thanks. tomer

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          You should "never" databind in a postback in the PageLoad event. You should do it in the buttons event or what ever your chosen event is , but not in PageLoad. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02

          T 1 Reply Last reply
          0
          • L leppie

            You should "never" databind in a postback in the PageLoad event. You should do it in the buttons event or what ever your chosen event is , but not in PageLoad. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02

            T Offline
            T Offline
            tomer dror
            wrote on last edited by
            #5

            ok thanks,i will do it. tomer

            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