473,947 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wondering what the difference is

hey all,

i saw the following in an article:

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

OnPageIndexChan ged="grdOrder_O nPageIndexChang ed"
OnItemCommand=" grdOrder_OnItem Command"
OnEditCommand=" grdOrder_OnEdit Command"
OnUpdateCommand ="grdOrder_OnUp dateCommand"
OnCancelCommand ="grdOrder_OnCa ncelCommand"


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 1107
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 InitialiseCompo nent
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*****@discus sions.microsoft .com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
hey all,

i saw the following in an article:

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

OnPageIndexChan ged="grdOrder_O nPageIndexChang ed"
OnItemCommand=" grdOrder_OnItem Command"
OnEditCommand=" grdOrder_OnEdit Command"
OnUpdateCommand ="grdOrder_OnUp dateCommand"
OnCancelCommand ="grdOrder_OnCa ncelCommand"
>


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*****@discus sions.microsoft .com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
hey all,

i saw the following in an article:

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

OnPageIndexChan ged="grdOrder_O nPageIndexChang ed"
OnItemCommand=" grdOrder_OnItem Command"
OnEditCommand=" grdOrder_OnEdit Command"
OnUpdateCommand ="grdOrder_OnUp dateCommand"
OnCancelCommand ="grdOrder_OnCa ncelCommand"
>
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
7154
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. Yensao
21
3051
by: b83503104 | last post by:
Hi, Can someone tell me the difference between single quote and double quote? Thanks
2
4791
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 a list of objects? Why the two types? And most importantly of all: Which one is the faster? Is it practical to use these in game programming for dynamic arrays, or are they too slow? Yours, Morten Aune Lyrstad
4
15783
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 which calculated the difference in years and days between two dates, and takes leap years into account? I'm calculating the difference in the usual way, i.e....
3
4173
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 column I have to show difference between Currenttime and date from ItemReceived. How can I do that.
12
2735
by: Petronius | last post by:
Hallo, does anyone have an idea how to implement difference lists in Javascript? Thanks allot in advance
5
3499
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: 1 day, 1hour
9
2690
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
12151
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 code is just returning me an array of 0's
0
9983
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
11577
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...
0
11169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9890
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
8256
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
6118
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
6333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4540
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.