-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: lacisum
Message 5 in Discussion

Hi,    
You can use server controls or HTML controls on a Web form. What�s the difference? 
Basically, server controls are a superset of HTML controls and offer the advantages 
described in Table   Table . Server Controls vs. HTML Controls     
Feature  
Server controls  
HTML controls    
Server events  
Trigger control-specific events on the server.  
Can trigger only page- level events on server (postback).   
State management  
Data entered in a control is maintained across requests.  
Data is not maintained; must be saved and restored using page-level scripts.   
Adaptation  
Automatically detect browser and adapt display as appropriate.  
No automatic adaptation; must detect browser in code or write for least common 
denominator.   
Properties  
The Microsoft .NET Framework provides a set of properties for each control. Properties 
allow you to change the control�s appearance and behavior within server-side code.  
HTML attributes only 
So why use anything other than server controls? Because HTML controls have a 
one-to-one correspondence with standard HTML elements, they provide more direct 
control over what appears on a page. You use HTML controls for the following reasons:  
    Migration from earlier versions of Active Server Pages (ASP).  
You can load an ASP application into Visual Studio and revise it gradually, rather 
than rewrite it completely. Earlier versions of ASP supported only HTML elements, and 
these elements become HTML controls when you load the project in Visual Studio .NET.   
Not all controls require server-side events or state management.  
This is particularly true when you�re doing data binding. Bound items are usually 
refreshed from the data source with each request, so it�s more efficient not to 
maintain state information for bound controls. This means that you can use HTML 
controls or turn off state management for bound server controls.      You have 
complete control over what is rendered with HTML controls.  
ASP.NET adjusts the appearance of server controls based on the browser making the 
request. HTML controls are not adjusted, so you have direct control over their 
appearance. 
Server and HTML controls provide overlapping functionality. In general, it is easier 
to work with server controls. Table lists the server controls and HTML controls by 
programming task. 
  Table Server and HTML Controls by Programming Task     
Task  
Server controls  
HTML controls    
Display text  
Label, TextBox, Literal  
Label, Text Field, Text Area, Password Field   
Display tables  
Table, DataGrid  
Table   
Select from list  
DropDownList, ListBox, DataList, Repeater  
List Box, Dropdown   
Perform commands  
Button, LinkButton, ImageButton  
Button, Reset Button, Submit Button   
Set values  
CheckBox, CheckBoxList, RadioButton, RadioButtonList  
Checkbox, Radio Button   
Display images  
Image, ImageButton  
Image   
Navigation  
Hyperlink  
none (use <a> tags in text)   
Group controls  
Panel, Placeholder  
Flow Layout, Grid Layout   
Work with dates  
Calendar  
none   
Display ads  
AdRotator  
none   
Display horizontal rules  
Literal  
Horizontal Rule   
Get filenames from client  
none  
File Field   
Store data on page  
(provided by state management)  
Input Hidden   
Validate data  
RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator, 
CustomValidator,ValidationSummary  
none (use page- level scripts) 
  
Regards  
Raghu Chakkath 
http://licasum.blogspot.com/ 
Microsoft India Community Star

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to