473,729 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Sep 24 '08 #1
2 1445
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
Sep 24 '08 #2
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

Sep 25 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6017
by: Glenn Owens | last post by:
I have an ASP.Net page on which there are serveral static controls (listboxes, radiobuttonlist and textboxes). These controls are used to create criteria from which the code-behind will dynamically create 1-n datagrids. When the Submit button is clicked I need to save (in viewstate) the contents of the criteria controls so that I can recreate the dynamic DataGrid(s) in the LoadViewState (overloaded method). I need to do this so that the...
3
1510
by: TPS | last post by:
Instead of using Hyperlinks and URL / Response.QueryString() parameters to pass state around in my app, I am using LinkButtons with a corresponding command event and command arguments. This page has LinkButtons in a menu down the left hand side, that when clicked causes the main content of the page to change. The main content of the page has linkbuttons as well. I am having trouble with the linkbuttons in the maincontent area keeping...
14
1737
by: Mike | last post by:
I have a routine that i only want to execute if a variable is set to Y. The routine is getting some information on the screen then redirecting to a new page. How can i passed a variable to the Page.IsPostBack routine on the page_load event? this is what I'm trying to do/ sub page_load if page.ispostback then dim value as string = CType(Session("quesiton"), string)
2
1689
by: Mr Newbie | last post by:
Ive got the basic idea behind DataBinding Expressions, but I have a couple of questions, Ok its four actually :) Q1.) It would appear that if you use Page.DataBind that all child controls and the page get bound to their respective DataSources, is this correct ? and if so why would you need to individually bind controls, why not jsut use Page.DataBind everytime?, Im sure there is a good reason why not but I cant think of one at the...
8
2761
by: TS | last post by:
Hi, i have inherited a page from another user. The page is the target frame in a frameset. for some reason the whole page runs twice (page_load, init, etc. all run twice) I can't figure out how this is happening. there are no transfers or redirects that are occurring in the pages. the page runs thru all of its events then starts all over again. Trying to inspect the stack track doesn't help because when i get to the init the 2nd time,...
6
4892
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
5
4124
by: Diane Truyens | last post by:
Hi, I have a form with textboxes, a search button and a gridview. The textboxes are filled with default values so that the gridview should return all rows but not before the user has had the chance to change some of the textboxes and has clicked the search button. How can I avoid the gridview displaying all rows before the search button was clicked? Any Ideas? Thanks Diane
4
1823
by: Arpan | last post by:
The following code works fine: <script runat="server"> Dim strName As String = "Arpan" Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Page.DataBind() End Sub </script> <form runat="server">
1
2090
by: Jordan S. | last post by:
I'm just wondering if this would work. Please note that I'm not asking *how* to raise events. I'm clear on that. What I'm not clear on is the sequence in which events are raised by custom controls relative to the hosting Page, and therefore if the following specific arrangement would even work. What I'm looking to do is dynamically insert multiple custom composite Web server controls onto a blank Page. This is no problem, I know how to do...
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9202
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8151
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4528
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2165
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.