ASP.NET INTERVIEW QUESTION & ANSWERS
131. |
Should validation occur server-side or client-side? Why? |
|
Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine. |
132. |
What type of code (server or client) is found in a Code-Behind class? |
|
Server-side code. |
133. |
What are the types of errors? |
|
- Syntax error : These include misspelled or missing keywords, or other mistakes relating to the syntax of the language.
- Runtime error : These errors are caused by the code that appears correct to the compiler, but that cannot run with certain values.
- Logic error : These are errors in which a program that works correctly under some circumstances gives unexpected or unwanted results based on certain input values.
|
|
Posted by Jyoti Sharma. (Aug 01, 2014) |
|
Application Error. |
134. |
How do I decide when to turn off a control's view state? |
|
You can look at the source for a page in your browser. In Internet Explorer, right click the page and select View Source. Within the source for your page, you can see the hidden field that contains the view state for a page, called_VIEWSTATE. If the view state hidden field is quite large, you might want to disable view state for the control. |
135. |
How do you customize the column content inside the datagrid? |
|
If you want to customize the content of a column, make the column a template column. Template columns work like item templates in the DataList or Repeater control, except that you are defining the layout of a column rather than a row. |