473,396 Members | 1,924 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,396 software developers and data experts.

ASP style in .NET

Hello,

I remember reading somewhere that using ASP style in ASP.NET is not
recommended.

For example, there is following situation:

<% If x = y %>
Some ASP.NET controls
<% End IF %>

V/s.

<panel id=mypanel runat=server>
Some ASP.NET controls
</panel>

And then code behind can turn 'mypanel' on or off!.

Now, is the 1st and 2nd are same from processing point of view or they
are different? I read somewhere that 2nd one has some advantage. But I
dont remember what!

Can you help!

Thanks,
Piyush
Nov 18 '05 #1
2 1057
SF
The second version would create another object (which needs GC etc.) whereas
the first would not.
From a runtime perspective, you probably save a cycle with the first
version. From a design/maintenance
perspective you mingle code with your markup, which most people consider not
the best style
(think developer/designer separation).

"Piyush Bhatt" <pi**********@htcinc.com> wrote in message
news:76**************************@posting.google.c om...
Hello,

I remember reading somewhere that using ASP style in ASP.NET is not
recommended.

For example, there is following situation:

<% If x = y %>
Some ASP.NET controls
<% End IF %>

V/s.

<panel id=mypanel runat=server>
Some ASP.NET controls
</panel>

And then code behind can turn 'mypanel' on or off!.

Now, is the 1st and 2nd are same from processing point of view or they
are different? I read somewhere that 2nd one has some advantage. But I
dont remember what!

Can you help!

Thanks,
Piyush

Nov 18 '05 #2
The major difference is that the first example is procedural in nature,
while ASP.Net, and the second example are object-oriented. The advantages of
object-oriented versus procedural programming are too numerous to mention
here.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Piyush Bhatt" <pi**********@htcinc.com> wrote in message
news:76**************************@posting.google.c om...
Hello,

I remember reading somewhere that using ASP style in ASP.NET is not
recommended.

For example, there is following situation:

<% If x = y %>
Some ASP.NET controls
<% End IF %>

V/s.

<panel id=mypanel runat=server>
Some ASP.NET controls
</panel>

And then code behind can turn 'mypanel' on or off!.

Now, is the 1st and 2nd are same from processing point of view or they
are different? I read somewhere that 2nd one has some advantage. But I
dont remember what!

Can you help!

Thanks,
Piyush

Nov 18 '05 #3

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

Similar topics

4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
1
by: Roy | last post by:
Hey all. All I'm trying to do is get a darn double solid bar in my datagrid footer. Doesn't seem to work. Any tips? The weird thing is all the other stylesheet attributes work. If I increase the...
0
by: cedoucette | last post by:
I just wrote code to support sortable columns in a datagrid. It seems to work fine; but, it doesn't look right. The problem is that I have a generic style for links and a different style for the...
1
by: RonY | last post by:
I have a dropdown which calls SetTimePeriod method on change the selection. In the JS function, I reset the field style.display based on what the selection is. This works fine with IE but not working...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
1
by: Armin Gajda | last post by:
Hi, I have the following problem: An input field get a border assigned by a style class (e.g. 2px solid red). When the field gets the focus, we set the border to green. element.style.border...
0
by: =?Utf-8?B?QXR1bA==?= | last post by:
When .Net 1.0 webservice (VS2003) generates a wsdl - <wsdl:binding name="TestSoap" type="tns:TestSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/(note:...
3
by: Michellevt | last post by:
Hi I am working on a project (for college) and wondered if anyone can help me with my problem. In the project we are not allowed to make use of any "style" attributes but "class" attributes...
3
Claus Mygind
by: Claus Mygind | last post by:
I want to move some style setting into a javaScript function so I can make them variable but I get "invalid assignment left-hand side" error? see my question at the bottom of this message. It...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.