473,671 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event Procedures and Methods

Hi All,

Could anybody give me some ideas on the advantages and disadvantages when it
comes to having Event Procedures and Methods in .aspx page rather than
having them in .aspx.cs/.aspx.vb

Regards,
Kuldeep
May 23 '06 #1
2 1092
Based on my personal experience it's better to use codebehind pages (i.e.
aspx.vb and aspx.cs) since it helps you to seperate the code and static
content. And prior to Visual Studio 2005 you do not have some IDE features
like intellisense when you are writing inline code (i.e. ASP.NET code within
an aspx file.) But in some special cases (like data binding some controls
together or catching events from objects within a DataGrid column -VS.NET
2003- etc. you might want to use inline code or tag-based attributes and
events of controls. But as I said they are special cases and they're not
like that you are writing alll the code inline.) Also theree's a new web
site project model with Visual Studio 2005 so that your code changes are
reflected to your website almost instantly. Prior to Visual Studio 2005
default project model for web applications (for Visual Studio.NET) was
precompiling all your codebehind pages inside of an assembly and that was
causing some problems with deployment and updates sometimes. But Visual
Studio 2005 has support for intellisense within aspx files and a new project
model. So in short, I like my code tidy and my static content seperated but
it's always up to you to decide. Oh and a side note, you can bring back the
old web application model (precompiled) to Visual Studio 2005 with a small
update from Microsoft if you wish.It has a slight advandatge of hiding your
VB or C# code within an assembly but remember that there are great
decompilers for C# out there.Link for web application project model:
http://msdn.microsoft.com/asp.net/re...p/default.aspx
"Kuldeep" <ku************ ****@hotmail.co m> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Hi All,

Could anybody give me some ideas on the advantages and disadvantages when
it comes to having Event Procedures and Methods in .aspx page rather than
having them in .aspx.cs/.aspx.vb

Regards,
Kuldeep

May 23 '06 #2
Thanks Kerem, that was a good insight.

Regards,
Kuldeep
May 23 '06 #3

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

Similar topics

6
2038
by: dwilliams | last post by:
Our organization has implemented an ASP.net application with an n-tiered architecture, made up of a business/data layer that calls T-SQL Stored procedures. We are attempting to better manage the many stored procedures we have written over the life of the application. To do this, we would like to determine which sprocs are being called from which asp.net page. As all Sproc calls are made through the business layer, we really want to map...
2
9225
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
4
10186
by: Corepaul | last post by:
I am a newbie using Access 2000. I am using the following test in the txtAlbum OnExit procedure to prevent leaving an empty text box for a required field If (IsNull(txtAlbum.Value)) Or (Len(txtAlbum.Value) < 1) Then MsgBox("Album Title cannot be empty") txtAlbum.SetFocus End If
3
3639
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind page, 2) Breakpoint in the Page_Load, 3) debug the web page and click the submit button, 4) "step into" under debug several times, 5) The debugger does not stop at any of the statements in the click event handler. A breakpoint is needed in each...
2
1294
by: Sandy | last post by:
Hello - I am used to retrieving data with stored procedures. DataSets have me baffled inasmuch as it exposes Sql statements directly in the code, however, I think I need to be working with Datasets for what I'm doing because I can't be continually posting back to the server. Is there a way to create datasets from stored procedures? Also, I have three tables. If I use datasets that access data from all
7
1709
by: Michael D. Ober | last post by:
Is there anyway to raise an event from a class and require that any program using that class (not just inheritance) have an event handler for specific events in the class? In my case, some events don't need to be handled, but some must be handled by the program that uses the class. I'm looking for something along the lines of Class MyClass Event OptionalEvent(parms) Event RequiredEvent(parms)
16
3584
by: Neil | last post by:
I am using Access 2003, and have an ongoing problem of every once in a while losing an event procedure for a form or control. The procedure's still in the code module, but the form or control's property sheet does not show "". I have to manually put it back, and then everything's fine. Does anyone know what causes this phenomenon, or, at the very least, how to tell if there are any of these "detached" event procedures? It's extremely...
18
2383
by: Andrew Wan | last post by:
I have been developing web applications with ASP & Javascript for a long time. I have been using Visual Studio 2003.NET. While VS2003 is okay for intellisense of ASP & Javascript, it's still not that great. One of the cons of ASP & Javascript is that they're both interpreted, which means one has twice the amount of work to do interms of syntax checking & semantic/runtime checking. Another bad thing is that ASP & Javascript doesn't have...
7
1834
by: Andrus | last post by:
I noticed that DataGridView CellValidated() and other event handler first parameter is object: Grid.CellValidated+=new DataGridViewCellEventHandler(Grid_CellValidated); .... void Grid_CellValidated(object sender, DataGridViewCellEventArgs e) { .....
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
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
8917
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
8821
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...
1
8598
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,...
1
6229
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
4225
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
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1809
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.