PC Review


Reply
Thread Tools Rate Thread

asp.net page connections

 
 
Tommi Kujala
Guest
Posts: n/a
 
      22nd Jul 2003
How do you hadle connections in asp.net pages?
Do I have to dispose connection every time when
I leave from page and then establish one on a new page.

How about user controls, where connections are needed?
If I use user controls in page, there can be many connections
open in one page, right?

Thanks for answers. I am just thinking generally handling connection
on pages and dont want to mess up with this thing.
Itīs quite important in performance issues.

-Tommy


 
Reply With Quote
 
 
 
 
Gavin Joyce
Guest
Posts: n/a
 
      22nd Jul 2003
Hi,

Generally, using database connections on ASP.NET pages is not great practice
as your pages will contain data access code. I recommend creating a number
Data Access Objects which look after talking to the database and returning
DataSets or DataReaders. This promotes reuse of the data access code, and
makes your projects easier to maintain.

Have a look at this sample application for example -
http://www.ntiergen.net/samples/contacts

Thanks,
Gavin Joyce
www.gavinjoyce.com

--
___________________________________________________________
nTierGen.NET Code Generator - http://www.nTierGen.NET/

Stored Procedures (Get, GetPaged, Insert, Update, Delete)
Data Access Layer - C#
Business Rules Layer - C# & VB.NET
Strongly-Typed DataSets - C#
Web Services - C#
___________________________________________________________
"Tommi Kujala" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do you hadle connections in asp.net pages?
> Do I have to dispose connection every time when
> I leave from page and then establish one on a new page.
>
> How about user controls, where connections are needed?
> If I use user controls in page, there can be many connections
> open in one page, right?
>
> Thanks for answers. I am just thinking generally handling connection
> on pages and dont want to mess up with this thing.
> Itīs quite important in performance issues.
>
> -Tommy
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Web Componets broke my data access page connections Dave Microsoft Access Forms 1 27th Nov 2007 06:29 PM
vista x64 with modified termsrv.dll with 2 terminal connections results in page fault blue screen.. markm75 Windows Vista General Discussion 2 6th Oct 2007 06:21 PM
disable 'connections' page in IE Cardiff IT Support Ltd Windows XP General 1 1st Mar 2007 09:37 AM
SqlClient Connections created don't get reused in the pool and causeerror in ASP.NET Page mc Microsoft ADO .NET 16 2nd Aug 2006 09:48 AM
Can no longer use My Network Connections to upload one page =?Utf-8?B?TWlzc01pY2tp?= Microsoft Frontpage 1 4th Nov 2005 02:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:36 AM.