{"id":85,"date":"2014-05-20T14:40:00","date_gmt":"2014-05-20T13:40:00","guid":{"rendered":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/20\/differences-between-user-and-custom-controls-in-asp-net\/"},"modified":"2014-05-20T14:40:00","modified_gmt":"2014-05-20T13:40:00","slug":"differences-between-user-and-custom-controls-in-asp-net","status":"publish","type":"post","link":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/20\/differences-between-user-and-custom-controls-in-asp-net\/","title":{"rendered":"Differences between user and custom controls in asp.net?"},"content":{"rendered":"<div class='booster-block booster-read-block'>\n                <div class=\"twp-read-time\">\n                \t<i class=\"booster-icon twp-clock\"><\/i> <span>Read Time:<\/span>57 Second                <\/div>\n\n            <\/div><div dir=\"ltr\" style=\"text-align: left;\">\n<span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9f9f9;\">1.User Control is a page file with extension .ascx which can only be&nbsp;<\/span><span style=\"background-color: #f9f9f9;\">used within<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">a single application.&nbsp;<\/span><\/span><br \/>\n<span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9f9f9;\">But custom controls are assemblies(dll files) that can be<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">used in multiple applications.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">2.User Controls cannot be added to the ToolBox of VS.NET . To use a user<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">Control with in an&nbsp;<\/span><span style=\"background-color: #f9f9f9;\">aspx page u have to drag the user Control from the solution Explorer to<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">designer page.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">But Custom Controls can be added to ToolBox of VS.NET.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">3.User Controls can be viewed as a sort of generic controls during the design<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">time.&nbsp;<\/span><span style=\"background-color: #f9f9f9;\">The proper GUI of user controls can be viewed only during the run time.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">But Custom Controls can be viewed during the design time.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">4. User controls are created from existing Webserver and html server controls .<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">But a developer who creates custom controls have to render every thing from the<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">scratch.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">5.Since the dll assembly of a custom control is being used,a custom control<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">developed in C# can be used in a project developed in VB.NET or any other<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">managed code and vice versa.<\/span><br style=\"background-color: #f9f9f9; margin: 0px; outline: none 0px; padding: 0px;\" \/><span style=\"background-color: #f9f9f9;\">This is not possible with user controls.They are language specific.<\/span><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1.User Control is a page file with extension .ascx which can only be&nbsp;used withina single application.&nbsp; But custom controls are assemblies(dll files) that can beused in multiple applications.2.User Controls cannot be added to the ToolBox of VS.NET . To use a userControl with in an&nbsp;aspx page u have to drag the user Control from the [&hellip;]<\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[23],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-asp-net"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Himanshu Namdeo","author_link":"https:\/\/debuggersspace.com\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"1.User Control is a page file with extension .ascx which can only be&nbsp;used withina single application.&nbsp; But custom controls are assemblies(dll files) that can beused in multiple applications.2.User Controls cannot be added to the ToolBox of VS.NET . To use a userControl with in an&nbsp;aspx page u have to drag the user Control from the&hellip;","_links":{"self":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/85"}],"collection":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":0,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"wp:attachment":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}