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

HTML Controls Vs Web Controls.

Just out of interest, what is everbody's thought on using HTML Controls Vs
Web Controls.

Any preferences??

Cheers,
Adam
Nov 19 '05 #1
7 1249
HTML controls a lightweight controls with a nostalgic interface.
Web Controls are more powerful, and therefore a bit slower.

Here are more details on the differences:
http://SteveOrr.net/faq/3in1.aspx#HTMLvsWeb

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Just out of interest, what is everbody's thought on using HTML Controls Vs
Web Controls.

Any preferences??

Cheers,
Adam

Nov 19 '05 #2
I never use a Web Control with an HTML equivilant unless absolutely
necessary.

DataGrids and Repeaters are fine, but using <asp:button> instead of
<input type=submit> just strikes me as silly, an can lead to
sloppiness. I've actually had to dress down a junior developer after
finding the following code in an application:
<asp:linkbutton id="myLink" onclick="myLink_Click" text="home"
runat=server></asp:linkbutton>

.... and on the server...

protected void myLink_Click(object sender, EventArgs e)
{
Response.Redirect("/home.aspx");
}
Anybody think they could come up with an HTML equivilant to the above?

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #3
I understand perfectly. No need to do a PostBack when client-side JavaScript
can easily do the job. I've seen it happen entirely too many times. But if
he's a junior developer, why would you need the HTML and JavaScript to do
this? Well, anyway:

<input type="button" value="Home" onclick="document.location='/home.aspx'">

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Jason Kester" <ja*********@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I never use a Web Control with an HTML equivilant unless absolutely
necessary.

DataGrids and Repeaters are fine, but using <asp:button> instead of
<input type=submit> just strikes me as silly, an can lead to
sloppiness. I've actually had to dress down a junior developer after
finding the following code in an application:
<asp:linkbutton id="myLink" onclick="myLink_Click" text="home"
runat=server></asp:linkbutton>

... and on the server...

protected void myLink_Click(object sender, EventArgs e)
{
Response.Redirect("/home.aspx");
}
Anybody think they could come up with an HTML equivilant to the above?

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #4
I was thinking more along the lines of:

<a href="/home.aspx">Home</a>

That's what he was trying to accomplish with that LinkButton!
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #5
Well, I presumed that a button was wanted. Of course, a hyperlink would be
simpler. But why would he (incorrectly) use a Button Control rather than
(incorrectly) a Hyperlink Control?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Jason Kester" <ja*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I was thinking more along the lines of:

<a href="/home.aspx">Home</a>

That's what he was trying to accomplish with that LinkButton!
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #6
Junior Developer. Never overestimate the capabilities of these guys.
They'll surprise you every time!

It was an ASP:LinkButton control that he used. Which renders as an
anchor tag with a bunch of javascript to force a postback. He was
looking for a control that looked like a link, and would take the user
to a different page when clicked.
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #7
>Junior Developer. Never overestimate the capabilities of these guys.
They'll surprise you every time!

It was an ASP:LinkButton control that he used. Which renders as an
anchor tag with a bunch of javascript to force a postback. He was
looking for a control that looked like a link, and would take the user
to a different page when clicked.


Which kind of leads you to wonder what's the most complicated and
convoluted way you do such a thing? I mean his way was fairly
complicated for such a simple task, but he is only a junior developer.
Surely the great experienced minds of this newsgroup can come up with an
even more convoluted way of achieving the same thing?

I throw down the gauntlet. Anyone care to take the challenge?

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #8

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

Similar topics

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...
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: 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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.