Sunday 24 November 2019

Difference between client side control and server side control in asp.net?




Difference Between Client Side and Server Side Control




Difference between Client side and server side control


Client Side Control:  client side control are also called as HTML control and HTML control are always render on browsers because browsers understand only html programming just
because of all html control executed at client machine's ( pc) browser thus these are known as client
side control and never executed server side or through server.

When client or user request a for a new page to the server then browser send request to server to access new page then server response back to client through the browser using html language and
display HTML .

as we discussed that client side control are html control and always written using <input> tag to create html control. client side control are processed by browser and executed on browser and return
back to browser i.e. browser understand only html control.

Generally HTML control are use to perform page validation through javascript ( client side programming) , normal calculation and displaying text information etc where no need to perform task through server.

To make html control ( client side) into server side control  in asp.net we have to define runat="sever"  attribute.

let take an example of textbox control in asp.net

<asp:TextBox ID ="txtname" runtat="server"><asp:TextBox>

Server Side Control: Server side control or web server are also known as asp.net control.
server side control always executed on server ( server is programming application ) . In asp.net server
side control are derived from System.Web.UI.WebControl base class.

all asp.net control always render with runat = "server"  attribute. it means these all control will executed  at server side and result get back to browser using html control.

Generally server side control are uses when there is need to send parameter to the processing by the
server and save or access with database .

For Login and Password validation we must use to  define server side control and for normal html
validation we can use html control .


Please see also ..

Architecture of .net framework .







Previous Post
First
Related Posts

4 comments: