473,657 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Latebinding or Webcontrols for best performance?

I currently populate my datagrids manually from a
codebehind and use webcontrols within the template columns
(for check boxes and viewing pleasure eg labels)

For performance and scalability... would late binding
where I'd just have <%=myVar%> really be a better way of
doing things?

I always had thought creating a webcontrol and populating
from codebehind was more optimized becase it was pre-
compiled.

Thanks
Weston Weems
Nov 18 '05 #1
4 1509
As far as asp.net goes, I wouldn't suggest using <%= %> if you can accomplish it from codebehind, it breaks the nice separation between code and html source. Compiled code is faster, and like you said using <%= %> doesn't get compiled until runtime, which takes a bit longer, but the performance difference wouldn't be anything to cry home about. As far as scalability, you'll want to stick with codebehind.

--Michael

"Weston Weems" <an*******@disc ussions.microso ft.com> wrote in message news:0b******** *************** *****@phx.gbl.. .
I currently populate my datagrids manually from a
codebehind and use webcontrols within the template columns
(for check boxes and viewing pleasure eg labels)

For performance and scalability... would late binding
where I'd just have <%=myVar%> really be a better way of
doing things?

I always had thought creating a webcontrol and populating
from codebehind was more optimized becase it was pre-
compiled.

Thanks
Weston Weems

Nov 18 '05 #2
Hrmm... I've heard arguments both ways... basically people
against the webcontrol's argument was simply that you had
to account for creation and gc of all the webcontrols.

Say I had a datagrid with 5 columns and 100 records, there
is 500 labels in memory (at least at the time of binding
anyway)

I could see how that route could cause some trouble in
resource management.

Anyway, anyone else have any input?
-----Original Message-----
As far as asp.net goes, I wouldn't suggest using <%= %> if you can accomplish it from codebehind, it breaks the
nice separation between code and html source. Compiled
code is faster, and like you said using <%= %> doesn't get
compiled until runtime, which takes a bit longer, but the
performance difference wouldn't be anything to cry home
about. As far as scalability, you'll want to stick with
codebehind.
--Michael

"Weston Weems" <an*******@disc ussions.microso ft.com>

wrote in message news:0b8601c48b 8a$2d63a7f0
$a*******@phx.g bl...
I currently populate my datagrids manually from a
codebehind and use webcontrols within the template columns (for check boxes and viewing pleasure eg labels)

For performance and scalability... would late binding
where I'd just have <%=myVar%> really be a better way of doing things?

I always had thought creating a webcontrol and populating from codebehind was more optimized becase it was pre-
compiled.

Thanks
Weston Weems

.

Nov 18 '05 #3
Every situation is unique, performance questions like these tend to be
slightly pointless (sorry). I'm not sure who's against web controls, my
guess is that they are doing very unique things (in which case asp.net as a
whole might not be well suited for there needs (although i even doubt this))
or they simply don't have much experience.

With performance, like most things, there's a law of diminishing return.
There are things you can spend minutes on to get huge gains (and you should
'cuz they are good practice)...wha t you are talking about will take you huge
time (maintenance and bugs) and gain your tiny performance gains (and you
shouldn't 'cuz its bad practice). Look at your own requirements if you need
an example. You could give yourself a headache by maintaining <%='s in 500
cells and gain 1/4 second per request. Or you could save yourself a lot of
trouble, create a solid caching strategy and gain 8 times that amount.

With performance, again like most things, things aren't black and white.
The extra performance you'll incur will save you $$$ in maintenance and
staff, which you could use to buy better hardware, which might cost you more
to host, but which might give you better uptime, which might.....
Karl
"Weston Weems" <an*******@disc ussions.microso ft.com> wrote in message
news:0d******** *************** *****@phx.gbl.. .
Hrmm... I've heard arguments both ways... basically people
against the webcontrol's argument was simply that you had
to account for creation and gc of all the webcontrols.

Say I had a datagrid with 5 columns and 100 records, there
is 500 labels in memory (at least at the time of binding
anyway)

I could see how that route could cause some trouble in
resource management.

Anyway, anyone else have any input?
-----Original Message-----
As far as asp.net goes, I wouldn't suggest using <%= %>

if you can accomplish it from codebehind, it breaks the
nice separation between code and html source. Compiled
code is faster, and like you said using <%= %> doesn't get
compiled until runtime, which takes a bit longer, but the
performance difference wouldn't be anything to cry home
about. As far as scalability, you'll want to stick with
codebehind.

--Michael

"Weston Weems" <an*******@disc ussions.microso ft.com>

wrote in message news:0b8601c48b 8a$2d63a7f0
$a*******@phx.g bl...
I currently populate my datagrids manually from a
codebehind and use webcontrols within the template columns (for check boxes and viewing pleasure eg labels)

For performance and scalability... would late binding
where I'd just have <%=myVar%> really be a better way of doing things?

I always had thought creating a webcontrol and populating from codebehind was more optimized becase it was pre-
compiled.

Thanks
Weston Weems

.

Nov 18 '05 #4
Depends on what you're doing in the code-behind i.e. how many controls are
being created/modified and how much work is being done with the control
tree. I would suggest in most cases using the databinding syntax in your
webform (<%#%> latebound) is almost certainly slower and should be avoided
where possible.
Of course, the only way to totally understand the effects of either approach
is to test your application with a load testing tool such as ACT or
Microsoft's other stress tool (freely available) WAST or Homer as it is
known.
Making assumptions regarding performance is a risky business.

--
Ben
http://bitarray.co.uk/ben
"Weston Weems" <an*******@disc ussions.microso ft.com> wrote in message
news:0d******** *************** *****@phx.gbl.. .
Hrmm... I've heard arguments both ways... basically people
against the webcontrol's argument was simply that you had
to account for creation and gc of all the webcontrols.

Say I had a datagrid with 5 columns and 100 records, there
is 500 labels in memory (at least at the time of binding
anyway)

I could see how that route could cause some trouble in
resource management.

Anyway, anyone else have any input?
-----Original Message-----
As far as asp.net goes, I wouldn't suggest using <%= %>

if you can accomplish it from codebehind, it breaks the
nice separation between code and html source. Compiled
code is faster, and like you said using <%= %> doesn't get
compiled until runtime, which takes a bit longer, but the
performance difference wouldn't be anything to cry home
about. As far as scalability, you'll want to stick with
codebehind.

--Michael

"Weston Weems" <an*******@disc ussions.microso ft.com>

wrote in message news:0b8601c48b 8a$2d63a7f0
$a*******@phx.g bl...
I currently populate my datagrids manually from a
codebehind and use webcontrols within the template columns (for check boxes and viewing pleasure eg labels)

For performance and scalability... would late binding
where I'd just have <%=myVar%> really be a better way of doing things?

I always had thought creating a webcontrol and populating from codebehind was more optimized becase it was pre-
compiled.

Thanks
Weston Weems

.

Nov 18 '05 #5

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

Similar topics

5
10710
by: Fabrizio | last post by:
HI, How i can use the Microsoft.Web.UI.WebControls reference inside a web project? There is any DLL to add? Thank you, Fabrizio
2
1492
by: Weston Weems | last post by:
Ok, I first of all dont know if thats the proper verbage.. lemme explain... Originally I was taught to handle databinding in a datagrid and such with Databinder.Eval from the template. Since then I've heard arguments for that and against. What I've grown accustomed to is to just throw a generically named lable in the template, then in onItemDataBound, do a e.Cells.FindControl("label") and change properties appropriately (some times...
4
1318
by: Daniel Groh | last post by:
Hi, I'm newbie to ASP.Net and I'd like to know the best way and when shoul I use WebControls and HTML Controls, what is the difference ? I'm developing a login system but i don't know if i use the textfield (HTML Controls) or textbox (WebControls). What's the difference ? I hope you can help me! Thanks a lot!
0
1228
by: RJN | last post by:
Hi all I'm calling a shared method in the class. This error appears in production though I'm not able to reproduce. Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object args, String paramnames, Boolean CopyBack) Any idea what could be the reason and how to simulate this
0
2054
by: RJN | last post by:
Hi Sorry for posting again. I'm calling a shared method in the class. The following error is found in production though I'm not able to reproduce. Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object args, String paramnames, Boolean CopyBack) Object variable or With block variable not set.
0
4347
by: Jim Duffie | last post by:
Hi, I am trying to build a simple websire using the above in Visual Web Developer. When finished I have build the website and it works fine locally but when I FTP it to the server I am getting a parse error. Should I be uploading a DLL as well (I can't see one in directory)? The error is :- Parser Error Message: Could not load type System.Web.UI.WebControls.Menu from assembly System.Web, Version=1.0.5000.0, Culture=neutral,...
1
1448
by: Angelo | last post by:
Ok, I am utilizing the threadpool class to manage a number of threads. Priority is not important to me and neither is if the threads are background or foreground threads so I opted for the threadpool class. The issue is that I am latebinding on several libraries that I have. (They're actually plug-ins.) How would I send the methods to the threadpool?
4
1702
by: Hakan ÖRNEK | last post by:
Hi, I have two dll's like First.dll and Second.dll compiled by vb.net, a object in first.dll and, b object in Second.dll. I need hold cross referances; a.breferance=b and b.areferance=a I know this is a circular referance, but I solved this case with latebinding in VB6. I can not create late binding with Createobject("....") function in VB.NET 2005. I think so this function using for com objects. How can I create
0
1081
by: Corey66 via DotNetMonster.com | last post by:
Hello! I' ve written a Application, in which I could import all contacts from Outlook into my programme and it works fine, but I use the reference from Outlook 10! My Problem is, that my application only works with Outlook 10, but the programme should be version independent. Someone told me, that I use LateBinding for it, but that is new for me! This my code to open Outlook: **************
0
8305
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
8825
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
7324
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
6163
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
5632
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
4151
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
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1611
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.