Page event sequence and Databinding question

  • Thread starter Thread starter Savvoulidis Iordanis
  • Start date Start date
S

Savvoulidis Iordanis

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
SelectedIndexChanged, RowCommand where the click is handled?

TIA
Iordanis
 
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 SelectedIndexChanged,
RowCommand, RowUpdating, etc ? Also, should I use RowCommand (using the
commandname="select") or the SelectedIndexChanged 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
 
Back
Top