473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

wondering what the difference is

hey all,

i saw the following in an article:

<asp:DataGrid id="grdOrder" Runat="server"

OnPageIndexChanged="grdOrder_OnPageIndexChanged"
OnItemCommand="grdOrder_OnItemCommand"
OnEditCommand="grdOrder_OnEditCommand"
OnUpdateCommand="grdOrder_OnUpdateCommand"
OnCancelCommand="grdOrder_OnCancelCommand"


What I want to know is, normally what i'm accustomed to is in the
code-behind you can select the datagrid from the left-drop down list and then
in the right drop-down list you can select the event and it will
automatically stub the event procedure for you.

It seems to me there are two different ways to do it. Is there a difference
in doing it one way or another. Can someone please enlighten me on this.

thanks,
rodchar
Nov 19 '05 #1
2 1090
Yes, you can either specify this through the code behind or in the ASPX
page.

The major difference being the method your calling will have to be public if
its called from the ASPX page and can be private if called from the code
behind.

I prefer using the Code Behind as it all goes into the InitialiseComponent
method and i find it easier to control from there.
Then again, in the ASPX side, you don't have to recompile if you change this
(unless the method name your calling is changing)

But functionally, they both do the same thing

(don't think there's anything else i'm overlooking, but there may well be,
anyone?)

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
hey all,

i saw the following in an article:

<asp:DataGrid id="grdOrder" Runat="server"

OnPageIndexChanged="grdOrder_OnPageIndexChanged"
OnItemCommand="grdOrder_OnItemCommand"
OnEditCommand="grdOrder_OnEditCommand"
OnUpdateCommand="grdOrder_OnUpdateCommand"
OnCancelCommand="grdOrder_OnCancelCommand"
>


What I want to know is, normally what i'm accustomed to is in the
code-behind you can select the datagrid from the left-drop down list and
then
in the right drop-down list you can select the event and it will
automatically stub the event procedure for you.

It seems to me there are two different ways to do it. Is there a
difference
in doing it one way or another. Can someone please enlighten me on this.

thanks,
rodchar

Nov 19 '05 #2
There is a famous problem with VS. Sometimes it erases the events set in the
Design mode. Defining events in .aspx file saves you from this. Also you can
trace changes with version control easier.

Eliyahu

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
hey all,

i saw the following in an article:

<asp:DataGrid id="grdOrder" Runat="server"

OnPageIndexChanged="grdOrder_OnPageIndexChanged"
OnItemCommand="grdOrder_OnItemCommand"
OnEditCommand="grdOrder_OnEditCommand"
OnUpdateCommand="grdOrder_OnUpdateCommand"
OnCancelCommand="grdOrder_OnCancelCommand"
>
What I want to know is, normally what i'm accustomed to is in the
code-behind you can select the datagrid from the left-drop down list and

then in the right drop-down list you can select the event and it will
automatically stub the event procedure for you.

It seems to me there are two different ways to do it. Is there a difference in doing it one way or another. Can someone please enlighten me on this.

thanks,
rodchar

Nov 19 '05 #3

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

Similar topics

34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
21
by: b83503104 | last post by:
Hi, Can someone tell me the difference between single quote and double quote? Thanks
2
by: Morten Aune Lyrstad | last post by:
Hi! I haven't been using the standard template libraries much. I have a hard time trying to figure out just what is the practical difference between std::vector and std::list. Aren't both basically...
4
by: jamesyreid | last post by:
Hi, I'm really sorry to post this as I know it must have been asked countless times before, but I can't find an answer anywhere. Does anyone have a snippet of JavaScript code I could borrow...
3
by: bbawa1 | last post by:
Hi, I have a table which has a field ItemsReceived of type datetime. I have a grid view which has two columns. In first column i have to show the data from field ItemsReceived and in second...
12
by: Petronius | last post by:
Hallo, does anyone have an idea how to implement difference lists in Javascript? Thanks allot in advance
5
by: Julius | last post by:
Hej dudes, I need to calc the difference between two timestamps / dates ... For example what i need to calculate: Date 1: 2007.11.06 - 20:13:04 Date 2: 2007.11.07 - 21:13:04 Difference:...
9
by: viki1967 | last post by:
Hi all! This new forum its great! :) Congratulations !!! My answer: why this my code not working? Nothing error but not work the difference.... : <html>
11
by: cmb3587 | last post by:
I have two arrays and I'm trying to create a 3rd array that is the difference between the two arrays Ex: arrayA: 3 5 8 9 arrayB: 3 4 6 9 difference of A-B: 5 8 however, my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.