Server-side versus Client-side controls?

Hi, I'm new to ASP.NET, and I was wondering how negligible the
performance impact of using server-side controls over client-side
controls is? Should I avoid using server-side controls and use
client-side ones whereever I can? Or should I not care? From apurely
aesthetic point-of-view, it would be nice to use mostly all server-side
controls to keep everything consistent.

What are your thoughts on this? Thanks.


0
Jesse
7/7/2005 1:59:14 AM
asp.net.web-forms 93655 articles. 5 followers. Follow

4 Replies
1085 Views

Similar Articles

[PageSpeed] 31

There are up's and down's of both server-side and client side controls.  Read this article and you will have a better understanding on which is better.

http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=569


Hope it helps you,
Matt

ADV Enterprises
www.adventerprises.net
0
aspnet_novice
7/7/2005 2:27:26 AM
Hi Jesse,
   U'll understand the power of Asp .net Server side controls once you read a little more. They are not meant just for the aesthetic appeal, but infact the whole model of asp .net programming is conceived this way.

   Ofcourse it puts more work on the Server, but still solves a lot of problems for the coder. Another important thing to be noted is, though asp .net uses the Server controls extensively it still uses javascript for controls validation, which is done at the client side.

  You are right! If you are new, you can just ignore worrying about server/client controls and learn it a bit more. Will become  easier once u write some samples.

HTH
0
muthuis
7/7/2005 2:31:04 AM
Thanks very much!
0
Jesse
7/7/2005 4:11:18 AM
You must do everything server-side because the client-side cannot be trusted.

However, there's nothing saying you can't do server-side *and* client-side.  Client-side certainly can make for a much nicer user experience.

However, mixing client and server-side poorly will result in a crappy user experience.  For instance, if you're using validation controls and you have a CustomValidator (or are otherwise doing server-side validation) you will usually want to either
A) Implement a client-side function for your CustomValidator

or

B) Set EnableClientScript = false on all your other controls.

If you mix client and server controls only halfway, you can end up with a very confusing UI for your users.  They don't understand ASP.NET and they probably don't understand HTTP POST either.  So when they click Save and half the fields complain instantly (client-side validation), they fix it and click Save again, then the rest of the fields complain (server-side validation)... well, it just confuses the hek out of the poor little guys.

0
rponton
7/13/2005 11:40:08 PM
Reply:

Similar Artilces:

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

web forms with client and server side controls??
Hi, I have a form that has client and server side controls. I have a problem in that any client controls (textbox) within the form runat="server" can not be accessed with client side code. Anyone got any ideas why and what work arounds are possible. Regards, Graham. once a form element is inside a <FORM> tag, you can no longer refer to it by its ID alone. you have to refer to it by formname.elementid or document.all.elementid. use document.getElementById(yourtextboxid) to get a ref to the element in the form. using this allows u to bypass the formn...

Combining a server-side control with a client-side control!
Hi all, I am trying to combine a server-side control with a client-side control. I have created a listbox in both sides, the client-side control's code is: <select size="4" name="lstFruit" id="Select1" ondblclick="lst_dblClick" visible="false"> <option value="Banana">Banana</option> <option value="Apple">Apple</option> <option value="Mango">Mango</option> <option value="Orange">Orange</option> </select> The other one is the server-side control which has this code:   I wanted to add the ondblClick attribute to the se...

What are diff Server-side control and Client-side control ?
What are diff Server-side control and Client-side control ? and diff server -side coding and client -side coding ? please help I have answered the first part of your question in your previous posting. Server-side coding languages are ASP, ASP.NET, PHP, CGI (Perl) and many, many more. They are used to create dynamic web content (based on additional information that is attached to the request) and are often used to extract information from databases. Client-side coding languages are JavaScript, VBScript, EMACScript and are used to create dynamic content that responds to the u...

server side controls in a non-server side form
I want to use server side controls in a non-server side form.I use server side controls (like dropdownlists) so I can fill them with the right options from the database.My question is, what is the best way to approach this?CAN I use server-side controls in a client side form? If so, how can I get the values contained in the controls when I do a post? (not in a querystring).Here's a sample of my code: <form id="frmAdvancedSearch" method="post" action="advancedSearch.aspx"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <input type="submit" /> </form>...

Server Side versus Client Side ?
Good day to all those that can assist me.  My name is Greg and I am sort of new to ASP and ASP.net.  I am however not new to programming in ohter languages.  I have a couple web pages I wrote that obtain information from the user and based on what specific information the user selects it will run a WScript and OShell telnet script I wrote when the user clicks on a button.  If I run this from my computer, running 2003 server,  using Visual Web Developer 2008 Express debugging (F5) feature, which launches a local browser, the program and WScript runs per...

How to Access/Pass Server Side Array Variable at Another Web Form's Client Side
Hi All,I struck up with some intrested senario at my application development...hope some body will guide me or sends me some code snippets....Thanks in advance.Senario is like this.....in A.aspx (using C# .net 2.0 as code behind) I am going to have a array variable basically it is an TWO Dimensional array after populating the values in array I need to redirect/ reload another web form B.aspx, here i need to access the array in B.aspx client side JavaScript.How can I do this...Thanks AgainRaju Dont do a redirect but use server.transfer. That way the previous page will still hold its value, ...

Is there a correspondance for each server side control to be equivalent to a client side html control
Where can find the list and can use that equivalence and what is its usage plsThanksThanks a lot, I appreciate your taking the time to help me. What exactly do you mean? A correspondence of what?All controls have a ClientID property, which for most controls tells the DOM element ID that will be used in the HTML rendering. Aside from that certain controls might offer additional client-side functionality, but there's no one standard.Thanks,EilonBlog: http://weblogs.asp.net/LeftSlipper/ I mean. When I am using html control in my aspx page like:  <input type=text ..>  and...

server-side control inside another server-side control
Hi everyone. I have a requirement where I need to create a custom server side control which will contain a series of ASP controls -- no problem there. However, this component also needs to itself be placed inside a server side control, and then placed into the page...so I'll have a custom server-side component inside a custom server-side component. Is that even possible? Everytime I start to think about it I get a headache. Thanks Matt  It's perfectly possible. Just give it a try and you'll see that it works.-- "Mark As Answer" if my reply helped you -- Yup...

differences between server side asynchronous Web methods and client side asynchronous Web methods
Hi,   can anyone expalin what are the differences between server side asynchronous Web methods  and client side asynchronous Web methods in ASP.Net 2.0 ?   any best articles on serverside asynchronous Web methods  ?   Thanks,  hi, check this url, Server-Side Asynchronous Methods for ASP.NET, http://www.codeproject.com/KB/cpp/asyncws.aspx   Calling the Server-Side method asynchronously from Client Script, http://www.c-sharpcorner.com/UploadFile/dipenlama22/Callbacks07182006093320AM/Callbacks.aspx...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click (Asp.net) and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

How to access dynamically Html controls (client side controls) using C# server side scripts
Folks,I have problem try to to access dynamically Html controls (client side controls) using C# server side scripts. Please give me helps.     The error is as follows Exception Details: System.InvalidCastException: Specified cast is not valid.Source Error: Line 79: { Line 80: Control c = Page.FindControl("ddlTC" + i); Line 81: ((DropDownList)c).DataSource = mdt; Line 82: ((DropDownList)c).DataTextField = "ClassID"; Line 83: ((DropDownList)c).DataValueField = "Course"; My aspx page source codes: ...<...

Jscript, moving from client-side to server-side (.NET)
Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

Server Side control invoking a Client Side event
I need to figure out how to get a server side control to process the "OnMouseOver" event. Since server side controls do not have the onmouseover event associated with them, how would you make for example, a DropDownList have a "OnMouseOver" event associate with it? The DropDownList must be server side. I guess the idea here is to set client-side events on the server-side control. Any help will be appreciated. You may try something like this: In server side code DDL1.Attributes.Add("onmouseover", "javascript:alert('Hi')") Th...

Web resources about - Server-side versus Client-side controls? - asp.net.web-forms

Server-side scripting - Wikipedia, the free encyclopedia
... unfocused, scattered, unnecessary details. WikiProject Technology or the Technology Portal may be able to help recruit an expert. Server-side ...

Google Cloud Platform simplifies server-side development for iOS w/ ‘Mobile Backend Starter’
... Mobile Backend Starter that first debuted for Android developers back in June. Google says the application helps to simplify the server-side ...

Free Cooling: the Server Side of the Story
Servers that support higher inlet temperatures could significantly reduce or even eliminate the cooling costs of the data center. We received ...


[Update: Check Now] Play Store For Android Gets Search Bar With Hamburger Flip In Server-Side Update
Google is pushing out an update to the Play Store's Android interface that replaces the action bar with a standard search bar. Inside are the ...

Server-side update makes Siri a stickler for succinctness
Siri is already well known for her wit and willingness to joke, but a recent server-side update has given Apple's digital assistant the ability ...

Japanese RIAA wants server-side music DRM for mobile phones
The Recording Industry Association of Japan—the Japanese version of the RIAA— …

New BaaS platform aims to eliminate writing server-side code
... offering for desktop and mobile developers that's now leaving its beta phase. By removing the need for writing code on the server-side, Backendless ...

Dart improves async and server-side performance
... Team Today's release of the Dart SDK version 1.3 includes a 2x performance improvement for asynchronous Dart code combined with server-side ...

Customize Google Using Server-Side Scripts
Google's services have a lot of powerful features, but they can't offer all the options requested by users. A popular way to customize Google ...

Resources last updated: 12/16/2015 4:22:14 AM