{"id":13,"date":"2014-07-22T05:06:32","date_gmt":"2014-07-22T05:06:32","guid":{"rendered":"http:\/\/mairwa.com\/wordpress\/?p=13"},"modified":"2014-07-22T05:06:32","modified_gmt":"2014-07-22T05:06:32","slug":"what-are-the-basic-differences-between-user-controls-and-custom-controls","status":"publish","type":"post","link":"http:\/\/mairwa.com\/wordpress\/?p=13","title":{"rendered":"What are the basic differences between user controls and custom controls?"},"content":{"rendered":"<p><span style=\"line-height:1.5;\">Now that you have a basic idea of what user controls and custom controls are and how to create them, let&#8217;s take a quick look at the differences between the two.<\/span><\/p>\n<div>\n<div><\/div>\n<div id=\"MT3\"><\/div>\n<table id=\"MT4\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td><b>Factors<\/b><\/td>\n<td><b>User control<\/b><\/td>\n<td><b>Custom control<\/b><\/td>\n<\/tr>\n<tr>\n<td>Deployment<\/td>\n<td>Designed for single-application scenarios<\/p>\n<p>Deployed in the source form (.ascx) along with the source code of the application<\/p>\n<p>If the same control needs to be used in more than one application, it introduces redundancy and maintenance problems<\/td>\n<td>Designed so that it can be used by more than one application<\/p>\n<p>Deployed either in the application&#8217;s Bin directory or in the global assembly cache<\/p>\n<p>Distributed easily and without problems associated with redundancy and maintenance<\/td>\n<\/tr>\n<tr>\n<td>Creation<\/td>\n<td>Creation is similar to the way Web Forms pages are created; well-suited for rapid application development (RAD)<\/td>\n<td>Writing involves lots of code because there is no designer support<\/td>\n<\/tr>\n<tr>\n<td>Content<\/td>\n<td>A much better choice when you need static content within a fixed layout, for example, when you make headers and footers<\/td>\n<td>More suited for when an application requires dynamic content to be displayed; can be reused across an application, for example, for a data bound table control with dynamic rows<\/td>\n<\/tr>\n<tr>\n<td>Design<\/td>\n<td>Writing doesn&#8217;t require much application designing because they are authored at design time and mostly contain static data<\/td>\n<td>Writing from scratch requires a good understanding of the control&#8217;s life cycle and the order in which events execute, which is normally taken care of in user controls<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"tocHeadRef\">Advanced topics<\/h3>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Now that you have a basic idea of what user controls and custom controls are and how to create them, let&#8217;s take a quick look at the differences between the two. Factors User control Custom control Deployment Designed for single-application scenarios Deployed in the source form (.ascx) along with the source code of the application If the same control needs&hellip; <a href=\"http:\/\/mairwa.com\/wordpress\/?p=13\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-c-vb","xfolkentry"],"_links":{"self":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":0,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"wp:attachment":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}