By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

HTML Controls Vs Web Controls.

P: n/a
Just out of interest, what is everbody's thought on using HTML Controls Vs
Web Controls.

Any preferences??

Cheers,
Adam
Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
>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 discussion thread is closed

Replies have been disabled for this discussion.