{"id":720,"date":"2010-08-05T16:21:45","date_gmt":"2010-08-05T10:51:45","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=720"},"modified":"2010-08-05T16:21:45","modified_gmt":"2010-08-05T10:51:45","slug":"page_load-firing-multiple-time-in-radwindow-popup","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/page_load-firing-multiple-time-in-radwindow-popup\/","title":{"rendered":"Clear ASP page cache &#8211; Page_Load() firing multiple time in RadWindow Popup"},"content":{"rendered":"<p>Setting <strong>ReloadOnShow <\/strong>property of RadWindow for Popup to <strong>true <\/strong>causes its Page_load to be executed multiple times hence redundant multiple database calls causing to some extent of performance hit.<\/p>\n<p>ReloadOnShow needs to be \u00a0set to true since page_load\/refresh of Popup wasn&#8217;t firing on subsequent opens.<\/p>\n<p><strong>Solution<\/strong><\/p>\n<p>We can set ReloadOnShow to false and use alternative code in page_load as following in C#:<\/p>\n<p>below code will clear the cache of ASPX page and thus reloaded\u00a0every time\u00a0in browser.<\/p>\n<p><strong>Note : you should run these statement before sending any HTML to the user. If in doubt, use Respose.Buffer = True to buffer all html<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\nResponse.Cache.SetCacheability(HttpCacheability.NoCache);\nResponse.Cache.SetNoServerCaching();\nResponse.Cache.SetNoStore();\nResponse.AppendHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);\nResponse.Expires = -1;\nResponse.CacheControl = &quot;no-cache&quot;;\n<\/pre>\n<p><a title=\"Find all Possible solutions\" href=\"http:\/\/www.telerik.com\/community\/forums\/aspnet\/window\/reloadonshow-true-makes-2-call-to-web-server.aspx\" target=\"_blank\">Find all possible solution at this URL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to prevent the multiple Page load event in case Telerik Rad Window Popup is used and Clear ASP page cache.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[21],"tags":[43,51,193],"class_list":["post-720","post","type-post","status-publish","format-standard","hentry","category-net","tag-asp-net","tag-c","tag-telerik"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":827,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/add-css-programatically-in-asp-net\/","url_meta":{"origin":720,"position":0},"title":"Add CSS Programatically in ASP.NET","author":"Jitendra","date":"September 3, 2010","format":false,"excerpt":"Tutorial on adding the CSS file dynamically in ASP.NET and C# \/ VB.Net","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1343,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/telerik-controls-css-lost-on-page-postback\/","url_meta":{"origin":720,"position":1},"title":"Telerik Controls &#8211; CSS Lost on Page Postback","author":"Jitendra","date":"November 9, 2010","format":false,"excerpt":"Telerik Controls - CSS Lost on Page Postback in Chrome and Mozilla firefox","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2299,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/tutorial-read-and-export-excel-file-in-asp-net-using-c\/","url_meta":{"origin":720,"position":2},"title":"Tutorial &#8211; Read and export excel file in ASP.Net  using C#","author":"Jitendra","date":"July 29, 2011","format":false,"excerpt":"Tutorial - Read and export excel file in ASP.Net using C#","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Read And Export Excel in ASP.Net","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/07\/Read-And-Export-Excel-in-ASP.Net_.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":608,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/selecting-and-sorting-in-datatable-asp-net-c\/","url_meta":{"origin":720,"position":3},"title":"Selecting and Sorting in DataTable &#8211; ASP.net C#","author":"Jitendra","date":"July 7, 2010","format":false,"excerpt":"Demonstrates that how to select and sort the Datatable in ASP.Net , C#","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Sorting and Selecting DataTable in ASP","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/07\/Sorting-and-Selecting-DataTable-in-ASP-300x223.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2395,"url":"https:\/\/www.jitendrazaa.com\/blog\/others\/tips\/asp-net-page-lifecycle\/","url_meta":{"origin":720,"position":4},"title":"ASP.NET Page Lifecycle","author":"Jitendra","date":"August 24, 2011","format":false,"excerpt":"Tutorial and sample source code on ASP.NET Page Lifecycle","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Control hierarchy after page_init() event in asp.net page life cycle","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/08\/Control-hierarchy-after-page_init-event-in-asp.net-page-life-cycle.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":895,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/multiplepage_load\/","url_meta":{"origin":720,"position":5},"title":"Page loads multiple times in Rad Window","author":"Jitendra","date":"August 27, 2010","format":false,"excerpt":"Solution of Multiple time page load problem of Telerik Rad Window.","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=720"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}