Page event sequence and Databinding question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

    Page event sequence and Databinding question

    Which is the event sequence when a gridview button (for update) is clicked
    and the page is post back? I am also a bit confused when to use
    ..IsPostBack(). If my page data is changing maybe in every 10 or 20 seconds,
    should I use .IsPostback? If not, then the gridviews databinding in the page
    should be written in Page_Load or in the other events like
    SelectedIndexCh anged, RowCommand where the click is handled?

    TIA
    Iordanis


  • Niraj Ranka

    #2
    Re: Page event sequence and Databinding question

    Can you please clear you question more..?

    On Sep 24, 2:54 pm, Savvoulidis Iordanis
    <SavvoulidisIor da...@discussio ns.microsoft.co mwrote:
    Which is the event sequence when a gridview button (for update) is clicked
    and the page is post back? I am also a bit confused when to use
    .IsPostBack(). If my page data is changing maybe in every 10 or 20 seconds,
    should I use .IsPostback? If not, then the gridviews databinding in the page
    should be written in Page_Load or in the other events like
    SelectedIndexCh anged, RowCommand where the click is handled?
    >
    TIA
    Iordanis

    Comment

    • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

      #3
      Re: Page event sequence and Databinding question

      I'm developing a sporting bet system, so players can send their betting slips
      on some events (usually worldwide soccer events). The available events to bet
      on, span a 3day period. But most bets are sent as the events are about to
      start or maybe half an hour earlier. So, when an event has started, it should
      go off the list, so noone else can select it. This means that the event list,
      although dynamic, is pretty static at first and then it should appear as
      dynamic as possible.

      How should I deal with the data refreshing? Should I use .IsPostback in
      Page_Load or not? Should I rebind ALL my gridviews only once in the Page_Load
      event, or in every other gridview event like SelectedIndexCh anged,
      RowCommand, RowUpdating, etc ? Also, should I use RowCommand (using the
      commandname="se lect") or the SelectedIndexCh anged event? There is also a bit
      of confusion here. Which of the above events fires first anyway? That's why I
      need to know the page event sequence.

      Also, I was thinking if it would be better to read the data from a XML file
      (no READ database hits) which the AdminUser creates for the players to see.
      This file would be recreated every time something changes (like if an event
      has started, or a betting odd has changed). Is it a better scenario for my
      case? Should I use caching of that XML data and how?

      Uphhh... I know I've set so many questions that need answers...but that's
      the kind of cloud inside my mind right now. I always want to follow best
      practices from the beginning, that's why I like to study a lot before
      starting off. Any help is appreciated.

      TIA

      Comment

      Working...