SlideShare a Scribd company logo
ASP.NET MVC Zero to Hero
Md. Mahedee Hasan
Microsoft MVP , Visual Studio and Development Technologies
Senior Software Architect, Leadsoft Bangladesh Limited
Trainer, Leads Training and Consulting Limited
Microsoft Community Contributor
Blog: http://mahedee.net
MVP | Software Architect | Trainer | Technical Blogger | MCTS
1
MAHEDEE.NET
2
Introduction to .NET
What is Microsoft .NET?
Another Programming Language?
.NETFramework
Programming Languages
C#, Visual Basic, C++, J# etc.
Markup Languages
HTML, XML etc.
Software development platform
Language neutral
Framework is a basic
or essential
supporting structure
of a system
A
framework
MAHEDEE.NET
3
Introduction to .NET …
Operating System + Hardware
.NET Framework
.NET Application
Narrow view of .NET framework
MAHEDEE.NET
4
ASP.NET
ASP – Active Server Page
Asp.net is an open source server-side web application framework
Designed for Web development to produce dynamic Web pages
Introduced in 1998
Introduction
MAHEDEE.NET
5
ASP.NET
ASP.NET is a new ASP generation.
ASP.NET pages are compiled, which makes them faster
Normally written in VB (Visual Basic) or C# (C sharp).
Introduction …
MAHEDEE.NET
6
ASP.NET
MAHEDEE.NET
7
ASP.NET Web form
Support multiple languages
Improved performance
Control-based, event-driven execution model
More productive
Allows clean cut code
MAHEDEE.NET
8
ASP.NET MVC
MAHEDEE.NET
9
Why .NET?
Easy to learn
Payment is high
High market demand
Develop scalable enterprise application
• Companies looking for .NET developers
• Microsoft
• Google
• CISCO
• Wipro Ltd
• Deloitt
• KPMG
• Marriott International
• Edward Jones
MAHEDEE.NET
10
Why .NET? …
Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
MAHEDEE.NET
11
Why .NET? …
MAHEDEE.NET
12
Why .NET? …
.NET developers are one of the highest paid
associates
Yearly Income (India) Rs. 334,959 per year [1]
Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
Highest paid .NET developers
ASP.NET MVC Developers IIS Administrator
MAHEDEE.NET
13
Average salary for .NET developers
International Market $45,569 ~ $103,575 per year [1]
Salary in Bangladesh
1. http://www.payscale.com/research/US/Job=.NET_Software_Developer_%2F_Programmer/Salary
2. http://www.salaryexplorer.com/salary-survey.php?loc=18&loctype=1&job=781&jobtype=3
MAHEDEE.NET
14
Job condition in market places
Lots of works
for .NET
developers
Specially for
asp.net
Many Bangladesh
Freelancer work in
.NET platform
.NET developers
are mostly top
rated
Comparatively
large project
MAHEDEE.NET
15
Job Opportunity in Local Market
MAHEDEE.NET
16
Job Opportunity in Local Market …
MAHEDEE.NET
17
Famous web application developed by asp.net
MAHEDEE.NET
18
Future of .NET
Cross Platform Framework
MAHEDEE.NET
19
Future of .NET …
.NET can be used to build
AR/VR application using
unity
Tizen allows .net
developers to build app in
Samsung devices including
Tvs and mobile
MAHEDEE.NET
20
Future of .NET …
MAHEDEE.NET
21
Future of .NET
Is an independent organization
To improve open source software development and
collaboration around the .net framework
MAHEDEE.NET
22
What is MVC?
Application
MAHEDEE.NET
23
What is ASP.NET MVC?
It is Software Architectural pattern
Software Architectural
Pattern
Software
Design Pattern
Run on ASP.NET Framework
MAHEDEE.NET
24
ASP.NET MVC Routing
MAHEDEE.NET
25
ASP.NET MVC Design Principle
Separation of Concern
Convention over configuration
MAHEDEE.NET
26
What is View Engine?
Rendering HTML from views to the browser.
View
Engine
Razor
Traditional
ASPX
Spark
Nhaml
etc
Razor is a markup
language embed with
server-based code
MAHEDEE.NET
27
ASP.NET MVC design goal
MAHEDEE.NET
28
ASP.NET MVC Folder Structure
MAHEDEE.NET
29
Layout
Provide a consistent look and feel on all the
pages of the application
Layout
Configuration
• Page level
• Folder level
• Root level
MAHEDEE.NET
30
Controller
Controllers are classes that handle incoming browser requests
Retrieve data, and then specify view templates and return a
response to the browser
MVC requires the name of all controllers to end with "Controller"
Controller classes inherited from Controller base class
The Controllers Folder contains the controller classes
MAHEDEE.NET
31
Action and Parameters
Action is a public method
The controller defines action methods
Controllers can include as many action methods as needed
Action methods typically have a one-to-one mapping with user
interactions
Can take one or more parameter
MAHEDEE.NET
32
Razor Template
MAHEDEE.NET
33
Introduction to EF
ORM often reduces the amount of code that
needs to be written
MAHEDEE.NET
34
Introduction to EF …
MAHEDEE.NET
36
EF Development Approach
MAHEDEE.NET
37
Annotation
Annotation is a configuration option of the domain class
Key
ForeignKey
NotMapped
StringLength
Timestamp
ConcurrencyCheck
Table
Index
Required
MinLength
MaxLength
Database Schema
related Attributes
Validation Attributes
Identity and Security
MAHEDEE.NET
38
MAHEDEE.NET
39
Authentication
MAHEDEE.NET
40
No Authentication
All anonymous users
MAHEDEE.NET
41
Individual Users Accounts
Forms Authentication
Can also enable Microsoft, Google, Facebook, Twitter
MAHEDEE.NET
42
Organizational Accounts
Active directory services (Azure, Office 365, Local)
MAHEDEE.NET
43
Windows Authentication
Intranet – no anonymous users
Performance tuning and
scalability improvement tips!!
MAHEDEE.NET
45
• How affect in performance?
– Create pdb (program database – uses for debugging) files which
creates extra overhead.
– For this reason you may face timeout problem.
• Best Practice
– Always prepare release in release mode.
MAHEDEE.NET
46
Prepare release with release mode
• By default debug=”true” when you create a web application.
• It is necessary to set debug=”true” in development
environment.
• How affect in performance?
– If you set debug = “true”, application requires the pdb
information to be inserted into the file
– So results in a comparatively larger file and hence processing will
be slow.
MAHEDEE.NET
47
In Web.Config, Set debug=”false”
• Best Practice
– In deployment server, set debug = “false” in web.config
<system.web>
<compilation debug="false" targetFramework="4.5.1" />
</system.web>
MAHEDEE.NET
48
In Web.Config, Set debug=”false”
• Trace the application to monitor the executions of
application or a pages
• Uses for diagnostic purpose
• How affect in performance?
– Loaded extra information to the pages which degrades
performances.
MAHEDEE.NET
49
Turn off Tracing unless until required
• Best Practice
– Always set trace enabled = “false” unless or until you required to
monitor a page’s executions
<system.web>
<trace enabled="true" pageOutput="true" requestLimit="10"
localOnly="false" mostRecent="true" traceMode="SortByTime"/>
</system.web>
MAHEDEE.NET
50
Turn off Tracing unless until required
• Though, ASP.NET manages session state by default, we must
pay attention of session memory management.
• How affect in performance?
– When you store your data in in-process or on a state server or in
a SQL Database, it requires memory.
– It is also time consuming when you store or retrieve data in-
process or state server or SQL server.
MAHEDEE.NET
51
Carefully manage session state
• Best Practice
– If your page is static, it is recommended not to use session state.
In such cases where you don’t need to use session state, disable it
on your web form using the following directive:
<@%Page EnableSessionState="false"%>
– In case you use the session state only to retrieve data and not to
update, make the session state read-only using the following
directive.
<@%Page EnableSessionState ="ReadOnly"%>
– Consider carefully whether there is a need of the state server or
SQL Server mode.
MAHEDEE.NET
52
Carefully manage session state …
• Best Practice
– SQL Server session mode provides lower performance than state
server mode.
– Try to avoid keeping object in session. Since it requires serializing
then de-serializing which affected in performance.
– Use client-side state management than server side.
MAHEDEE.NET
53
Carefully manage session state …
• View State provides page level state management
• As long as the user is on the current page, state is available
and the user redirects to the next page and the current page
state is lost
• View State can store any type of data because it is object
type but it is preferable not to store a complex type of data
due to the need for serialization and deserialization on each
post back
MAHEDEE.NET
54
Disable View State of a page if not required
• How affect in performance?
– It increases the total payload of a page when submitted and
when serving request.
– Serialization and deserialization of the data is required when
submitting data and gets requested data.
• Best Practice
– Pages that do not have any server postback events can have the
view state turned off.
– The default behaviour of the View State property is enabled, but
if you don’t need it, you can turn it off at the control or page
level.
<%@ Page EnableViewState="false" %>
MAHEDEE.NET
55
Disable View State of a page if not required
• Finally block executes whether any exception occurs or not.
• How affect in performance?
– Sometimes application occupy resources where as it doesn’t
need it.
• Best Practice
– Always use a finally block to release resources like closing
database connections, closing files, disposing objects etc.
MAHEDEE.NET
56
Use finally block to release resources
• To show huge number of data in gridview, we cannot think
general way because it takes huge time to load.
• Best Practice
– To load grid view faster take advantages of paging, it shows small
subsets of data at a time.
– JQGrid is faster than asp.net grid view because it does
everything in client side.
MAHEDEE.NET
57
Use paging in grid view
• How affect in performance?
– The uses of web server controls increase the response time.
– Web server controls go to the server executes all of its life cycle
and then rendered on the client side.
• Best Practice
– Don’t use server control unless until required.
– Use HTML elements where suited.
MAHEDEE.NET
58
Minimizes number of web server control
• My blog site: http://mahedee.net
• TechNet Profile:
https://social.technet.microsoft.com/profile/mahede
e/
• Github Profile: https://github.com/mahedee
• Slide Share http://www.slideshare.net/mahedee19
MAHEDEE.NET
59
Q&A
• Email: mahedee.hasan@gmail.com;
Mahedee_hasan@leads-bd.com
• Tag me in facebook group post
• https://www.facebook.com/groups/mstech.bd
• https://www.facebook.com/groups/techshareonline/
MAHEDEE.NET
60
Q&A
• Me in Facebook:
https://facebook.com/mahedee19
• Me in Linkedin:
https://www.linkedin.com/in/mahedee
MAHEDEE.NET
61
Q&A
62

More Related Content

PPTX
Azure Machine Learning
PPSX
Exciting features in visual studio 2017
PDF
The world of enterprise solution development with asp.net and C#
DOC
Sumit resume
PPTX
Internship softwaretraining@ijse
KEY
DOC
PDF
Introduction to TFS 2013
Azure Machine Learning
Exciting features in visual studio 2017
The world of enterprise solution development with asp.net and C#
Sumit resume
Internship softwaretraining@ijse
Introduction to TFS 2013

Similar to ASP.NET MVC Zero to Hero (20)

PPTX
Full-stack App in half a Day: Next.js 15 Development Bootcamp
PPTX
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
DOCX
JOB PORTALProject SummaryTitle JOB-PORT.docx
PDF
Improving Website Performance and Scalability with Memcached
PDF
Targeting Mobile Platform with MVC 4.0
DOCX
High performance coding practices code project
PPTX
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
PPTX
Mvc presentation
PPTX
Building and managing applications fast for IBM i
PPTX
Which is better asp.net mvc vs asp.net
PDF
Mvc15 (1)
PPTX
Performace optimization (increase website speed)
PDF
Java ee7 with apache spark for the world's largest credit card core systems, ...
PDF
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
PDF
Introduction to ASP.NET MVC
PPT
Appengine json
PPTX
ASP.NET Presentation
PPT
Asp.net Developers portfolio and case study NicheTech
PPT
Google app development
PPT
Google app developers
Full-stack App in half a Day: Next.js 15 Development Bootcamp
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
JOB PORTALProject SummaryTitle JOB-PORT.docx
Improving Website Performance and Scalability with Memcached
Targeting Mobile Platform with MVC 4.0
High performance coding practices code project
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Mvc presentation
Building and managing applications fast for IBM i
Which is better asp.net mvc vs asp.net
Mvc15 (1)
Performace optimization (increase website speed)
Java ee7 with apache spark for the world's largest credit card core systems, ...
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
Introduction to ASP.NET MVC
Appengine json
ASP.NET Presentation
Asp.net Developers portfolio and case study NicheTech
Google app development
Google app developers
Ad

More from Md. Mahedee Hasan (15)

PPTX
Chatbot development with Microsoft Bot Framework and LUIS
PPTX
Chatbot development with Microsoft Bot Framework
PPTX
Introduction to Windows 10 IoT Core
PPTX
Whats new in visual studio 2017
PPTX
Increasing productivity using visual studio 2017
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
PDF
Introduction to OMNeT++
PPTX
Feature and Future of ASP.NET
PPTX
Generic Repository Pattern with ASP.NET MVC and EF
PPSX
C#.net applied OOP - Batch 3
PDF
Object Oriented Programming
PPSX
Oop principles
PPSX
MS SQL Server
PPSX
C# - Part 1
PPSX
ASP.NET Web form
Chatbot development with Microsoft Bot Framework and LUIS
Chatbot development with Microsoft Bot Framework
Introduction to Windows 10 IoT Core
Whats new in visual studio 2017
Increasing productivity using visual studio 2017
Generic repository pattern with ASP.NET MVC and Entity Framework
Introduction to OMNeT++
Feature and Future of ASP.NET
Generic Repository Pattern with ASP.NET MVC and EF
C#.net applied OOP - Batch 3
Object Oriented Programming
Oop principles
MS SQL Server
C# - Part 1
ASP.NET Web form
Ad

Recently uploaded (20)

PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PPTX
Presentation of Computer CLASS 2 .pptx
PDF
Jenkins: An open-source automation server powering CI/CD Automation
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Best Practices for Rolling Out Competency Management Software.pdf
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
PPTX
Services offered by Dynamic Solutions in Pakistan
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
Best Mobile App Development Company in Lucknow - Code Crafter Web Solutions
PDF
Convert Thunderbird to Outlook into bulk
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PPTX
Benefits of DCCM for Genesys Contact Center
PPTX
Odoo Consulting Services by CandidRoot Solutions
PDF
Comprehensive Salesforce Implementation Services.pdf
PDF
Exploring AI Agents in Process Industries
PDF
Become an Agentblazer Champion Challenge
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
PDF
Rise With SAP partner in Mumbai.........
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PTS Company Brochure 2025 (1).pdf.......
Micromaid: A simple Mermaid-like chart generator for Pharo
Presentation of Computer CLASS 2 .pptx
Jenkins: An open-source automation server powering CI/CD Automation
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Best Practices for Rolling Out Competency Management Software.pdf
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Services offered by Dynamic Solutions in Pakistan
The Five Best AI Cover Tools in 2025.docx
Best Mobile App Development Company in Lucknow - Code Crafter Web Solutions
Convert Thunderbird to Outlook into bulk
A REACT POMODORO TIMER WEB APPLICATION.pdf
Benefits of DCCM for Genesys Contact Center
Odoo Consulting Services by CandidRoot Solutions
Comprehensive Salesforce Implementation Services.pdf
Exploring AI Agents in Process Industries
Become an Agentblazer Champion Challenge
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Rise With SAP partner in Mumbai.........

ASP.NET MVC Zero to Hero

  • 1. ASP.NET MVC Zero to Hero Md. Mahedee Hasan Microsoft MVP , Visual Studio and Development Technologies Senior Software Architect, Leadsoft Bangladesh Limited Trainer, Leads Training and Consulting Limited Microsoft Community Contributor Blog: http://mahedee.net MVP | Software Architect | Trainer | Technical Blogger | MCTS 1
  • 2. MAHEDEE.NET 2 Introduction to .NET What is Microsoft .NET? Another Programming Language? .NETFramework Programming Languages C#, Visual Basic, C++, J# etc. Markup Languages HTML, XML etc. Software development platform Language neutral Framework is a basic or essential supporting structure of a system A framework
  • 3. MAHEDEE.NET 3 Introduction to .NET … Operating System + Hardware .NET Framework .NET Application Narrow view of .NET framework
  • 4. MAHEDEE.NET 4 ASP.NET ASP – Active Server Page Asp.net is an open source server-side web application framework Designed for Web development to produce dynamic Web pages Introduced in 1998 Introduction
  • 5. MAHEDEE.NET 5 ASP.NET ASP.NET is a new ASP generation. ASP.NET pages are compiled, which makes them faster Normally written in VB (Visual Basic) or C# (C sharp). Introduction …
  • 7. MAHEDEE.NET 7 ASP.NET Web form Support multiple languages Improved performance Control-based, event-driven execution model More productive Allows clean cut code
  • 9. MAHEDEE.NET 9 Why .NET? Easy to learn Payment is high High market demand Develop scalable enterprise application
  • 10. • Companies looking for .NET developers • Microsoft • Google • CISCO • Wipro Ltd • Deloitt • KPMG • Marriott International • Edward Jones MAHEDEE.NET 10 Why .NET? … Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
  • 12. MAHEDEE.NET 12 Why .NET? … .NET developers are one of the highest paid associates Yearly Income (India) Rs. 334,959 per year [1] Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M Highest paid .NET developers ASP.NET MVC Developers IIS Administrator
  • 13. MAHEDEE.NET 13 Average salary for .NET developers International Market $45,569 ~ $103,575 per year [1] Salary in Bangladesh 1. http://www.payscale.com/research/US/Job=.NET_Software_Developer_%2F_Programmer/Salary 2. http://www.salaryexplorer.com/salary-survey.php?loc=18&loctype=1&job=781&jobtype=3
  • 14. MAHEDEE.NET 14 Job condition in market places Lots of works for .NET developers Specially for asp.net Many Bangladesh Freelancer work in .NET platform .NET developers are mostly top rated Comparatively large project
  • 19. MAHEDEE.NET 19 Future of .NET … .NET can be used to build AR/VR application using unity Tizen allows .net developers to build app in Samsung devices including Tvs and mobile
  • 21. MAHEDEE.NET 21 Future of .NET Is an independent organization To improve open source software development and collaboration around the .net framework
  • 23. MAHEDEE.NET 23 What is ASP.NET MVC? It is Software Architectural pattern Software Architectural Pattern Software Design Pattern Run on ASP.NET Framework
  • 25. MAHEDEE.NET 25 ASP.NET MVC Design Principle Separation of Concern Convention over configuration
  • 26. MAHEDEE.NET 26 What is View Engine? Rendering HTML from views to the browser. View Engine Razor Traditional ASPX Spark Nhaml etc Razor is a markup language embed with server-based code
  • 29. MAHEDEE.NET 29 Layout Provide a consistent look and feel on all the pages of the application Layout Configuration • Page level • Folder level • Root level
  • 30. MAHEDEE.NET 30 Controller Controllers are classes that handle incoming browser requests Retrieve data, and then specify view templates and return a response to the browser MVC requires the name of all controllers to end with "Controller" Controller classes inherited from Controller base class The Controllers Folder contains the controller classes
  • 31. MAHEDEE.NET 31 Action and Parameters Action is a public method The controller defines action methods Controllers can include as many action methods as needed Action methods typically have a one-to-one mapping with user interactions Can take one or more parameter
  • 33. MAHEDEE.NET 33 Introduction to EF ORM often reduces the amount of code that needs to be written
  • 36. MAHEDEE.NET 37 Annotation Annotation is a configuration option of the domain class Key ForeignKey NotMapped StringLength Timestamp ConcurrencyCheck Table Index Required MinLength MaxLength Database Schema related Attributes Validation Attributes
  • 40. MAHEDEE.NET 41 Individual Users Accounts Forms Authentication Can also enable Microsoft, Google, Facebook, Twitter
  • 41. MAHEDEE.NET 42 Organizational Accounts Active directory services (Azure, Office 365, Local)
  • 43. Performance tuning and scalability improvement tips!! MAHEDEE.NET 45
  • 44. • How affect in performance? – Create pdb (program database – uses for debugging) files which creates extra overhead. – For this reason you may face timeout problem. • Best Practice – Always prepare release in release mode. MAHEDEE.NET 46 Prepare release with release mode
  • 45. • By default debug=”true” when you create a web application. • It is necessary to set debug=”true” in development environment. • How affect in performance? – If you set debug = “true”, application requires the pdb information to be inserted into the file – So results in a comparatively larger file and hence processing will be slow. MAHEDEE.NET 47 In Web.Config, Set debug=”false”
  • 46. • Best Practice – In deployment server, set debug = “false” in web.config <system.web> <compilation debug="false" targetFramework="4.5.1" /> </system.web> MAHEDEE.NET 48 In Web.Config, Set debug=”false”
  • 47. • Trace the application to monitor the executions of application or a pages • Uses for diagnostic purpose • How affect in performance? – Loaded extra information to the pages which degrades performances. MAHEDEE.NET 49 Turn off Tracing unless until required
  • 48. • Best Practice – Always set trace enabled = “false” unless or until you required to monitor a page’s executions <system.web> <trace enabled="true" pageOutput="true" requestLimit="10" localOnly="false" mostRecent="true" traceMode="SortByTime"/> </system.web> MAHEDEE.NET 50 Turn off Tracing unless until required
  • 49. • Though, ASP.NET manages session state by default, we must pay attention of session memory management. • How affect in performance? – When you store your data in in-process or on a state server or in a SQL Database, it requires memory. – It is also time consuming when you store or retrieve data in- process or state server or SQL server. MAHEDEE.NET 51 Carefully manage session state
  • 50. • Best Practice – If your page is static, it is recommended not to use session state. In such cases where you don’t need to use session state, disable it on your web form using the following directive: <@%Page EnableSessionState="false"%> – In case you use the session state only to retrieve data and not to update, make the session state read-only using the following directive. <@%Page EnableSessionState ="ReadOnly"%> – Consider carefully whether there is a need of the state server or SQL Server mode. MAHEDEE.NET 52 Carefully manage session state …
  • 51. • Best Practice – SQL Server session mode provides lower performance than state server mode. – Try to avoid keeping object in session. Since it requires serializing then de-serializing which affected in performance. – Use client-side state management than server side. MAHEDEE.NET 53 Carefully manage session state …
  • 52. • View State provides page level state management • As long as the user is on the current page, state is available and the user redirects to the next page and the current page state is lost • View State can store any type of data because it is object type but it is preferable not to store a complex type of data due to the need for serialization and deserialization on each post back MAHEDEE.NET 54 Disable View State of a page if not required
  • 53. • How affect in performance? – It increases the total payload of a page when submitted and when serving request. – Serialization and deserialization of the data is required when submitting data and gets requested data. • Best Practice – Pages that do not have any server postback events can have the view state turned off. – The default behaviour of the View State property is enabled, but if you don’t need it, you can turn it off at the control or page level. <%@ Page EnableViewState="false" %> MAHEDEE.NET 55 Disable View State of a page if not required
  • 54. • Finally block executes whether any exception occurs or not. • How affect in performance? – Sometimes application occupy resources where as it doesn’t need it. • Best Practice – Always use a finally block to release resources like closing database connections, closing files, disposing objects etc. MAHEDEE.NET 56 Use finally block to release resources
  • 55. • To show huge number of data in gridview, we cannot think general way because it takes huge time to load. • Best Practice – To load grid view faster take advantages of paging, it shows small subsets of data at a time. – JQGrid is faster than asp.net grid view because it does everything in client side. MAHEDEE.NET 57 Use paging in grid view
  • 56. • How affect in performance? – The uses of web server controls increase the response time. – Web server controls go to the server executes all of its life cycle and then rendered on the client side. • Best Practice – Don’t use server control unless until required. – Use HTML elements where suited. MAHEDEE.NET 58 Minimizes number of web server control
  • 57. • My blog site: http://mahedee.net • TechNet Profile: https://social.technet.microsoft.com/profile/mahede e/ • Github Profile: https://github.com/mahedee • Slide Share http://www.slideshare.net/mahedee19 MAHEDEE.NET 59 Q&A
  • 58. • Email: [email protected]; [email protected] Tag me in facebook group post • https://www.facebook.com/groups/mstech.bd • https://www.facebook.com/groups/techshareonline/ MAHEDEE.NET 60 Q&A
  • 59. • Me in Facebook: https://facebook.com/mahedee19 • Me in Linkedin: https://www.linkedin.com/in/mahedee MAHEDEE.NET 61 Q&A
  • 60. 62