473,395 Members | 2,689 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,395 software developers and data experts.

Combing html and server controls

I'm interested in people's views on combining standard html controls
and asp.net server controls.

I've seen some applications where server controls were only used where
server side processing and control were required, combining them with
standard html for the static part of the page. Others have constructed
the page using almost entirely server controls (for example, using
asp:Label controls for text that will not change).

Is there a consensus on best practice here? For myself, I err on the
side of using html controls as much as possible (without the runat
attribute) as there is more consistency to how they are rendered. and
are easier to control with CSS.

Thanks
Aug 2 '08 #1
2 1213
"Will" <ma********@hotmail.comwrote in message
news:80**********************************@m36g2000 hse.googlegroups.com...
For myself, I err on the side of using html controls as much as possible
(without the runat attribute) as there is more consistency to how they
are rendered. and are easier to control with CSS.
In what way(s) is there more consistency in how they are rendered?

In what way(s) are they easier to control with CSS?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 2 '08 #2
use asp.net controls if you want abstraction from html and like the
"fake" event processing of asp.net. use html controls if you are writing
client code, or are concered about the html generated.

if you know html, you might want to switch to MVC toolkit, which
eliminates the fake events, and allows unit tests.

-- bruce (sqlwork.com)

Will wrote:
I'm interested in people's views on combining standard html controls
and asp.net server controls.

I've seen some applications where server controls were only used where
server side processing and control were required, combining them with
standard html for the static part of the page. Others have constructed
the page using almost entirely server controls (for example, using
asp:Label controls for text that will not change).

Is there a consensus on best practice here? For myself, I err on the
side of using html controls as much as possible (without the runat
attribute) as there is more consistency to how they are rendered. and
are easier to control with CSS.

Thanks
Aug 2 '08 #3

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

Similar topics

1
by: Hari | last post by:
What is the difference between HTML controls, HTML server controls , ASP.Net controls? Which will give more performance?
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
3
by: mca | last post by:
Hi everyone, I'm new to asp.net and i have a question about separating the html code from the programming code. i have an unknown numbers of entries in my table. I want to make a hyperlink...
5
by: siaj | last post by:
Hello All, Can any one give me a clue when to use Web Server controls/ HTML server controls/HTML Controls. As I understand .. HTML controls should be used if u dont need to refer it in the code...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
5
by: Brian Kitt | last post by:
I have a C# application that builds dynamic HTML and renders it. Because it is rendered in this way, the input controls are not server controls. I write the entire page, which has a variable...
4
by: SAI | last post by:
Both have "TextBox" element and "Runat server". I don't understand the difference. Please advise. Thanks.
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.