By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,705 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,705 IT Pros & Developers. It's quick & easy.

Page event sequence and Databinding question

P: n/a
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
Sep 24 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can you please clear you question more..?

On Sep 24, 2:54*pm, Savvoulidis Iordanis
<SavvoulidisIorda...@discussions.microsoft.comwrot e:
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
Sep 24 '08 #2

P: n/a
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

Sep 25 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.