Link to home
Start Free TrialLog in
Avatar of SamJolly
SamJollyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

HTML Controls in Visual Studio 2008, ASP.NET2

Hi All,

I have noticed that the "Run At Server" command has disappeared from the context sensitive menu for HTML controls in Visual Studio 2008. It is fine in VS2005. Even if you add the attribute to the source, your codebehind code is NOT generated for you when you double click on the control. Again this works fine in VS2005 and you are left in the codebehind editor with the generated event code?

Any idea why this is so? Has MS decided that HTML controls are obsolete?

Thanks,

Sam
Avatar of dctuck
dctuck
Flag of United Kingdom of Great Britain and Northern Ireland image

I've just tried it, and it seems MS are going the Client-Side route for HTML controls - if you add a HTML button control, don't add the runat="server" tag, and double-click the button in the designer, it generates a JavaScript method automatically for the onclick event
Avatar of SamJolly

ASKER

dctuck, thanks.... yes that what I found. I was not too sure whether it was a config issue or a Microsoft issue !!! It may be acedemic since one should be using web controls anyway - I think ......

Sam
BTW, Happy New Year...!!!
Happy New Year to you, too :)
Am correct in my assertion as below?

" I was not too sure whether it was a config issue or a Microsoft issue !!! It may be acedemic since one should be using web controls anyway - I think ......"

Thanks,

Sam
It depends, really - the .Net controls have a fair bit of overhead, because of all of the additional properties. Since they only really render as HTML controls anyway, if you only need the click event for a button (for example), you don't need to used ASP.NET controls - if you use the standard HTML button with Runat="server", you can get away with the bare minimum of server traffic (if you need to be that careful about it)
Interesting point about performance...

I am also curious as to why MS has made the HTML control activate from the client via JS? To me it just seems a an extra layer of technology. So in my my book this seems a big shame...

What is your view?

Sam
ASKER CERTIFIED SOLUTION
Avatar of dctuck
dctuck
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Daniel,

Thanks for your valuable help. I will close this now.

Sam
Thanks