SlideShare a Scribd company logo
Dot Net Training
How To Optimize Asp.Net Application ?
Dot Net Training
In this article, we will walk via some performance improvement techniques in ASP.NET
Web Applications.
It’s universal that customer expects the good performance of a web application.
Basically, large-scale Web applications are deployed to load-balancing servers to
share traffic evenly across a number of application servers.
Additional application servers are added without making any further changes to the
application.
The application server might enhance Web application performance; however, there
are ways to improve performance on the developer side as well.
You can follow certain optimization techniques when you code that can reduce a lot of
performance issues. It is essential to know which parts code or code parts can be
optimized, and how you can measure improvements in performance.
Dot Net Training
Here we share a number of optimization techniques that you can use:
Discard objects from the caller method than in the called method.
Use connection pooling such that the connections can be re-used during requirement
of future requests to the database.

Delete white spaces and extra tags to reduce the size of your pages. Make limited
use of graphics and consider using compressed graphics.

Reduce page load times by minimizing the scripts.

Use cascading style sheets to avoid repeated sending of the same formatting
directives to the client.

Use short control names because they generate unique HTMLID names.

Minimize redundant processing by using Page.IsPostBack .

Use for each loop instead of a for loop if possible.

Avoid using ViewState to facilitate faster page loads.
Dot Net Training
Cache the Web pages or a portion if the page is large. Use data caching for improving
the application performance instead of fetching data from a file or database.
Data is stored in the memory of Datasets hence write efficient SQL queries or
procedures that fetch only the required information.
So not use Page.DataBind. Instead, code data bind on specific controls because the
page-level method calls the DataBind method of every control on the page that
supports data binding.
Use minimal, call to DataBinder.Eval because this method uses reflection to access
the arguments that are passed in and to return the results. For example, if a page has
a table of 50 rows and 10 columns, DataBinder.Eval will be named 500 times if you
use DataBinder.Eval on each column. Instead, use clear casting offers better
performance by keeping away the cost of reflection. Cast the Container.DataItem as a
DataRowView, as shown in the following code .
Dot Net Training
<ItemTemplate> <tr> <td><%# ((DataRowView)Container.DataItem) ["First_Name"]
%></td> <td><%# ((DataRowView)Container.DataItem) ["Last_Name"] %></td>
</tr></ItemTemplate>
You can achieve better performance with clear casting if you use a DataReader to
bind your control and use the special methods to retrieve your data. Cast the
Container.DataItem as a DbDataRecord.
<ItemTemplate> <tr> <td><%# ((DbDataRecord)Container.DataItem) .GetString(0)
%></td> <td><%# ((DbDataRecord)Container.DataItem) .GetInt(1) %></td>
</tr></ItemTemplate>
Dot Net Training
Disable useless session states because ASP.NET Manages a session state by default
and lessens the cost in memory when you don’t use it.
For example, if your pages are fixed or when you don’t require to store information
captured in the page.
<@%Page EnableSessionState=”false”%>
make read only session state for retrieving data
<@%Page EnableSessionState =”ReadOnly”%>
Turn off tracing unless needed.
<trace enabled=”false” requestLimit=”8″ pageoutput=”false” traceMode=”SortByTime”
localOnly=”true”>
Use SqlDataReader to visit the read-only data and not DataSet.
You can return multiple result sets by using dynamic SQL, it is preferable to utilize
stored procedures to get multiple result sets
Dot Net Training
Using gzip compression can reduce the number of bytes sent by the server. This helps
faster page loads and also cuts down on bandwidth usage.
If you got a bunch of .NET Web services running in one IIS Application and utilized by
another IIS application, the first call to Web services, in most cases, might be pretty
slow. To speed up the initial call, you can create the XmlSerializers DLL at compile
time.
Hope the above-mentioned points would help you to code at ease.
If you want to learn ASP.Net and perfect yourself in .NET training, then CRB Tech
Solutions would be of great help and support for you. Join us with our updated
program in ASP.Net course.
Stay tuned to CRB Tech reviews for more technical optimization and other resources.
Thank You..!
Dot Net Training

More Related Content

Viewers also liked

GolfOuting2016
GolfOuting2016GolfOuting2016
GolfOuting2016
Anna Schmalzriedt
 
B17 nl. 8docx
B17 nl. 8docxB17 nl. 8docx
B17 nl. 8docx
Cathalijne Zoete
 
Lançamento Visalus expansão europeia (Portugal) para empreendedores
Lançamento Visalus expansão europeia (Portugal) para empreendedoresLançamento Visalus expansão europeia (Portugal) para empreendedores
Lançamento Visalus expansão europeia (Portugal) para empreendedores
Pedro Henrique
 
Derechos de autor
Derechos de autorDerechos de autor
Derechos de autor
daniela rodrigez
 
Moda e design
Moda e designModa e design
Moda e design
Eur&ca S.r.l.
 
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
Italo Loris Ligonzo
 
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
InSide Training
 
Beta Staff Detailed Profile 2015
Beta Staff Detailed Profile 2015Beta Staff Detailed Profile 2015
Beta Staff Detailed Profile 2015
Beta Staff
 

Viewers also liked (8)

GolfOuting2016
GolfOuting2016GolfOuting2016
GolfOuting2016
 
B17 nl. 8docx
B17 nl. 8docxB17 nl. 8docx
B17 nl. 8docx
 
Lançamento Visalus expansão europeia (Portugal) para empreendedores
Lançamento Visalus expansão europeia (Portugal) para empreendedoresLançamento Visalus expansão europeia (Portugal) para empreendedores
Lançamento Visalus expansão europeia (Portugal) para empreendedores
 
Derechos de autor
Derechos de autorDerechos de autor
Derechos de autor
 
Moda e design
Moda e designModa e design
Moda e design
 
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
Piano di branding per Xianyang: produzione vinicola, enoturismo e "Made in It...
 
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
Lo storytelling è morto. Viva lo storytelling! (Alberto Maestri)
 
Beta Staff Detailed Profile 2015
Beta Staff Detailed Profile 2015Beta Staff Detailed Profile 2015
Beta Staff Detailed Profile 2015
 

Similar to How To Optimize Asp.Net Application ?

IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentation
ahsanmm
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
Optimize access
Optimize accessOptimize access
Optimize access
Ala Esmail
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
clickramanm
 
ASP.NET MVC Zero to Hero
ASP.NET MVC Zero to HeroASP.NET MVC Zero to Hero
ASP.NET MVC Zero to Hero
Md. Mahedee Hasan
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
Constantin Stan
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
Rasbor.com
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
sacred 8
 
Dat336
Dat336Dat336
Ssis optimization –better designs
Ssis optimization –better designsSsis optimization –better designs
Ssis optimization –better designs
varunragul
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
Abhishek Sur
 
ASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the Trenches
Habeeb Rushdan
 
Asp.Net Tips
Asp.Net TipsAsp.Net Tips
Asp.Net Tips
Susan Begonja
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
Brian Huff
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
Vishwanath Ramdas
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010
Ben Robb
 
From Concept to Launch How to Create a Custom WordPress Website.pdf
From Concept to Launch How to Create a Custom WordPress Website.pdfFrom Concept to Launch How to Create a Custom WordPress Website.pdf
From Concept to Launch How to Create a Custom WordPress Website.pdf
WebConnect Pvt Ltd
 
Introduction to Magento Optimization
Introduction to Magento OptimizationIntroduction to Magento Optimization
Introduction to Magento Optimization
Fabio Daniele
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun
 
Extreme SSAS - Part II
Extreme SSAS - Part IIExtreme SSAS - Part II
Extreme SSAS - Part II
Itay Braun
 

Similar to How To Optimize Asp.Net Application ? (20)

IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentation
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC Applications
 
Optimize access
Optimize accessOptimize access
Optimize access
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
ASP.NET MVC Zero to Hero
ASP.NET MVC Zero to HeroASP.NET MVC Zero to Hero
ASP.NET MVC Zero to Hero
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
Dat336
Dat336Dat336
Dat336
 
Ssis optimization –better designs
Ssis optimization –better designsSsis optimization –better designs
Ssis optimization –better designs
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
ASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the Trenches
 
Asp.Net Tips
Asp.Net TipsAsp.Net Tips
Asp.Net Tips
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010
 
From Concept to Launch How to Create a Custom WordPress Website.pdf
From Concept to Launch How to Create a Custom WordPress Website.pdfFrom Concept to Launch How to Create a Custom WordPress Website.pdf
From Concept to Launch How to Create a Custom WordPress Website.pdf
 
Introduction to Magento Optimization
Introduction to Magento OptimizationIntroduction to Magento Optimization
Introduction to Magento Optimization
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
Extreme SSAS - Part II
Extreme SSAS - Part IIExtreme SSAS - Part II
Extreme SSAS - Part II
 

More from Pooja Gaikwad

Building A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- IIBuilding A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- II
Pooja Gaikwad
 
Learning .NET Attributes
Learning .NET AttributesLearning .NET Attributes
Learning .NET Attributes
Pooja Gaikwad
 
Forms authentication in asp dot net
Forms authentication in asp dot netForms authentication in asp dot net
Forms authentication in asp dot net
Pooja Gaikwad
 
Owin and katana overview
Owin and katana overviewOwin and katana overview
Owin and katana overview
Pooja Gaikwad
 
Top 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answersTop 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answers
Pooja Gaikwad
 
Dot Net Certification Course Pune
Dot Net Certification Course PuneDot Net Certification Course Pune
Dot Net Certification Course Pune
Pooja Gaikwad
 
An Overview ASP.NET vNEXT - CRB Tech
An Overview ASP.NET vNEXT - CRB TechAn Overview ASP.NET vNEXT - CRB Tech
An Overview ASP.NET vNEXT - CRB Tech
Pooja Gaikwad
 
Importance of msil in dot net
Importance of msil in dot netImportance of msil in dot net
Importance of msil in dot net
Pooja Gaikwad
 
A simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB TechA simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB Tech
Pooja Gaikwad
 
History of-silverlight-versions-and-its-features-CRB-Tech
History of-silverlight-versions-and-its-features-CRB-TechHistory of-silverlight-versions-and-its-features-CRB-Tech
History of-silverlight-versions-and-its-features-CRB-Tech
Pooja Gaikwad
 
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB TechExploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Pooja Gaikwad
 
.Net framework-garbage-collection
.Net framework-garbage-collection.Net framework-garbage-collection
.Net framework-garbage-collection
Pooja Gaikwad
 

More from Pooja Gaikwad (12)

Building A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- IIBuilding A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- II
 
Learning .NET Attributes
Learning .NET AttributesLearning .NET Attributes
Learning .NET Attributes
 
Forms authentication in asp dot net
Forms authentication in asp dot netForms authentication in asp dot net
Forms authentication in asp dot net
 
Owin and katana overview
Owin and katana overviewOwin and katana overview
Owin and katana overview
 
Top 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answersTop 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answers
 
Dot Net Certification Course Pune
Dot Net Certification Course PuneDot Net Certification Course Pune
Dot Net Certification Course Pune
 
An Overview ASP.NET vNEXT - CRB Tech
An Overview ASP.NET vNEXT - CRB TechAn Overview ASP.NET vNEXT - CRB Tech
An Overview ASP.NET vNEXT - CRB Tech
 
Importance of msil in dot net
Importance of msil in dot netImportance of msil in dot net
Importance of msil in dot net
 
A simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB TechA simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB Tech
 
History of-silverlight-versions-and-its-features-CRB-Tech
History of-silverlight-versions-and-its-features-CRB-TechHistory of-silverlight-versions-and-its-features-CRB-Tech
History of-silverlight-versions-and-its-features-CRB-Tech
 
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB TechExploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
 
.Net framework-garbage-collection
.Net framework-garbage-collection.Net framework-garbage-collection
.Net framework-garbage-collection
 

Recently uploaded

C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 

Recently uploaded (20)

C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 

How To Optimize Asp.Net Application ?

  • 2. Dot Net Training In this article, we will walk via some performance improvement techniques in ASP.NET Web Applications. It’s universal that customer expects the good performance of a web application. Basically, large-scale Web applications are deployed to load-balancing servers to share traffic evenly across a number of application servers. Additional application servers are added without making any further changes to the application. The application server might enhance Web application performance; however, there are ways to improve performance on the developer side as well. You can follow certain optimization techniques when you code that can reduce a lot of performance issues. It is essential to know which parts code or code parts can be optimized, and how you can measure improvements in performance.
  • 3. Dot Net Training Here we share a number of optimization techniques that you can use: Discard objects from the caller method than in the called method. Use connection pooling such that the connections can be re-used during requirement of future requests to the database.  Delete white spaces and extra tags to reduce the size of your pages. Make limited use of graphics and consider using compressed graphics.  Reduce page load times by minimizing the scripts.  Use cascading style sheets to avoid repeated sending of the same formatting directives to the client.  Use short control names because they generate unique HTMLID names.  Minimize redundant processing by using Page.IsPostBack .  Use for each loop instead of a for loop if possible.  Avoid using ViewState to facilitate faster page loads.
  • 4. Dot Net Training Cache the Web pages or a portion if the page is large. Use data caching for improving the application performance instead of fetching data from a file or database. Data is stored in the memory of Datasets hence write efficient SQL queries or procedures that fetch only the required information. So not use Page.DataBind. Instead, code data bind on specific controls because the page-level method calls the DataBind method of every control on the page that supports data binding. Use minimal, call to DataBinder.Eval because this method uses reflection to access the arguments that are passed in and to return the results. For example, if a page has a table of 50 rows and 10 columns, DataBinder.Eval will be named 500 times if you use DataBinder.Eval on each column. Instead, use clear casting offers better performance by keeping away the cost of reflection. Cast the Container.DataItem as a DataRowView, as shown in the following code .
  • 5. Dot Net Training <ItemTemplate> <tr> <td><%# ((DataRowView)Container.DataItem) ["First_Name"] %></td> <td><%# ((DataRowView)Container.DataItem) ["Last_Name"] %></td> </tr></ItemTemplate> You can achieve better performance with clear casting if you use a DataReader to bind your control and use the special methods to retrieve your data. Cast the Container.DataItem as a DbDataRecord. <ItemTemplate> <tr> <td><%# ((DbDataRecord)Container.DataItem) .GetString(0) %></td> <td><%# ((DbDataRecord)Container.DataItem) .GetInt(1) %></td> </tr></ItemTemplate>
  • 6. Dot Net Training Disable useless session states because ASP.NET Manages a session state by default and lessens the cost in memory when you don’t use it. For example, if your pages are fixed or when you don’t require to store information captured in the page. <@%Page EnableSessionState=”false”%> make read only session state for retrieving data <@%Page EnableSessionState =”ReadOnly”%> Turn off tracing unless needed. <trace enabled=”false” requestLimit=”8″ pageoutput=”false” traceMode=”SortByTime” localOnly=”true”> Use SqlDataReader to visit the read-only data and not DataSet. You can return multiple result sets by using dynamic SQL, it is preferable to utilize stored procedures to get multiple result sets
  • 7. Dot Net Training Using gzip compression can reduce the number of bytes sent by the server. This helps faster page loads and also cuts down on bandwidth usage. If you got a bunch of .NET Web services running in one IIS Application and utilized by another IIS application, the first call to Web services, in most cases, might be pretty slow. To speed up the initial call, you can create the XmlSerializers DLL at compile time. Hope the above-mentioned points would help you to code at ease. If you want to learn ASP.Net and perfect yourself in .NET training, then CRB Tech Solutions would be of great help and support for you. Join us with our updated program in ASP.Net course. Stay tuned to CRB Tech reviews for more technical optimization and other resources.