Home
%3CLINGO-SUB%20id%3D%22lingo-sub-347707%22%20slang%3D%22en-US%22%3EIIS7%20%E2%80%93%20Writing%20your%20first%20custom%20UI%20module%20with%20all%20winform%20controls%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-347707%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EYou%20should%20follow%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22http%3A%2F%2Flearn.iis.net%2Fpage.aspx%2F269%2Fhow-to-create-a-simple-iis-manager-module%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%3C%2FA%3E%20article%20on%20IIS.net%20to%20create%20your%20first%20%E2%80%9Csimple%E2%80%9D%20IIS7%20UI%20extension%20which%20would%20just%20display%20a%20message%20box%20when%20loaded.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EIn%20this%20blog%2C%20I%E2%80%99m%20going%20to%20explain%20you%20how%20you%20could%20design%20a%20UI%20module%20where%20you%20can%20add%20any%20UI%20control%20that%20you%20might%20add%20to%20a%20WinForm.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EBasically%2C%20the%20UI%20which%20appears%20in%20the%20middle%20pane%20is%20just%20an%20extension%20of%20Windows%20Form%2C%20and%20you%20can%20easily%20design%20that%20using%20Visual%20Studio.%20For%20example%2C%20the%20below%20%E2%80%9CSSL%20settings%E2%80%9D%20page%20has%20few%20checkboxes%2C%20radio%20buttons%2C%20and%20Apply%2FCancel%20on%20the%20Actions%20pane.%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_2.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22530%22%20height%3D%22252%22%20title%3D%22image%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22image%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_thumb.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EAll%20your%20controls%20should%20be%20placed%20or%20added%20into%20a%20class%20within%20your%20assembly%20which%20should%20derive%20from%20Microsoft.Web.Management.Client.Win32.ModulePage.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EBefore%20we%20start%20adding%20a%20class%20deriving%20from%20ModulePage%2C%20please%20make%20sure%20you%20have%20completed%20your%20Module%20and%20ModuleProvider%20classes%20by%20following%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22http%3A%2F%2Flearn.iis.net%2Fpage.aspx%2F269%2Fhow-to-create-a-simple-iis-manager-module%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%3C%2FA%3E%20article%2C%20and%20also%20make%20sure%20your%20assembly%20would%20be%20put%20in%20GAC.%20Your%20project%20should%20look%20like%20below%20with%20DemoKey.snk%2C%20and%20also%20the%20proper%20references%20to%20the%20Microsoft.Web.Management%2C%20and%20Microsoft.Web.Administration%3A%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_4.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22368%22%20height%3D%22224%22%20title%3D%22image%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22image%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_thumb_1.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20font-weight%3A%20bold%3B%22%3E%3CU%20style%3D%22box-sizing%3A%20border-box%3B%22%3EAdding%20a%20ModulePage%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EAdd%20a%20new%20class%20to%20the%20existing%20project%2C%20and%20name%20it%20as%20MyPage.cs.%20Derive%20the%20class%20from%20Microsoft.Web.Management.Client.Win32.ModulePage.%20Now%2C%20let%E2%80%99s%20try%20to%20add%20some%20code%20which%20runs%20when%20this%20ModulePage%20runs%20%E2%80%93%20let%E2%80%99s%20put%20a%20MessageBox%20on%20the%20constructor.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EBelow%20is%20how%20my%20code%20looks%20now%3A%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23808080%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20margin-left%3A%204px%3B%20margin-right%3A%204px%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%200px%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23ffffff%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20black%3B%20left%3A%20-2px%3B%20position%3A%20relative%3B%20top%3A%20-2px%3B%20border%3A%201px%20solid%20%232e595c%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%233f73b6%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20white%3B%20width%3A%20100%25%3B%20border%3A%201px%20solid%20blue%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20width%3A%20100%25%3B%22%3ECode%20Snippet%20displaying%20a%20simple%20message%20box%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CPRE%20style%3D%22background-color%3A%20%23f5f5f5%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20line-height%3A%201.4285%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20word-break%3A%20break-all%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Eusing%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20System%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Eusing%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20System.Windows.Forms%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Eusing%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20Microsoft.Web.Management.Client.Win32%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Enamespace%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20MyIIS7UIExtensions%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Einternal%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Eclass%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EMyPage%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20%3A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EModulePage%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Epublic%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20MyPage()%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EMessageBox%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E.Show(%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23ff00ff%3B%22%3E%22Testing%20this!!!!%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E)%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%7D%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%7D%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EYou%20should%20build%20the%20assembly%2C%20and%20put%20it%20in%20the%20assembly%20(dll)%20in%20the%20GAC%2C%20and%20add%20the%20below%20to%20your%20administrationHost.config%3A%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CMODULEPROVIDERS%3E%3C%2FMODULEPROVIDERS%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CADD%20name%3D%22%26quot%3BMyIIS7UIExtensions%26quot%3B%22%20type%3D%22%26quot%3BMyIIS7UIExtensions.MyModuleProvider%2C%22%20myiis7uiextensions%3D%22%22%3E%3C%2FADD%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E........%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%0A%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CMODULES%3E%3C%2FMODULES%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CADD%20name%3D%22%26quot%3BMyIIS7UIExtensions%26quot%3B%22%3E%3C%2FADD%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E.........%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EYou%20should%20see%20the%20below%20in%20your%20IIS%20manager.%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_6.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22282%22%20height%3D%22192%22%20title%3D%22image%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22image%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_thumb_2.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EIf%20you%20double%20click%20on%20the%20%E2%80%9CMyIIS7UIExtensions%E2%80%9D%2C%20you%20should%20see%20the%20below%20message%20box%2C%20and%20if%20you%20click%20OK%2C%20then%20you%20would%20see%20the%20whole%20UI%2C%20but%20no%20controls.%20Just%20because%20you%20haven%E2%80%99t%20added%20them%20still%20J%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fclip_image008_2.jpg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22144%22%20height%3D%22147%22%20title%3D%22clip_image008%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22clip_image008%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fclip_image008_thumb.jpg%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_8.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22365%22%20height%3D%22234%22%20title%3D%22image%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22image%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_thumb_3.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EIf%20you%20get%20to%20this%20stage%2C%20then%20you%20are%20almost%20there%20in%20making%20your%20real%20IIS7%20UI%20extension%2C%20rest%20of%20the%20steps%20are%20really%20easy%20if%20you%20are%20a%20windows%20forms%20programmer.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20font-weight%3A%20bold%3B%22%3E%3CU%20style%3D%22box-sizing%3A%20border-box%3B%22%3EAdding%20Winform%20controls%20to%20our%20UI%20Extension%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ELet%E2%80%99s%20say%20you%20want%20to%20have%20a%20combo%20box%20listing%20all%20the%20application%20pools%20that%20are%20available.%20How%20to%20design%20that%3F%20First%2C%20you%20have%20to%20add%20the%20combo%20box%20inside%20your%20ModulePage.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20style%3D%22background-color%3A%20%23f5f5f5%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.4285%3B%20orphans%3A%202%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20pre%3B%20word-break%3A%20break-all%3B%20word-spacing%3A%200px%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%20%20%20%20%20%20%20%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Epublic%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20MyPage()%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Ethis%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E.Controls.Add(%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Enew%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EComboBox%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E())%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EThe%20above%20code%20will%20add%20a%20new%20combo%20box.%20But%2C%20you%20want%20to%20really%20specify%20how%20it%20should%20appear%2C%20and%20its%20co-ordinates%2C%20don%E2%80%99t%20you%3F%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23808080%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20margin-left%3A%204px%3B%20margin-right%3A%204px%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%200px%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23ffffff%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20black%3B%20left%3A%20-2px%3B%20position%3A%20relative%3B%20top%3A%20-2px%3B%20border%3A%201px%20solid%20%232e595c%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%233f73b6%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20white%3B%20width%3A%20100%25%3B%20border%3A%201px%20solid%20blue%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20width%3A%20100%25%3B%22%3EModified%20constructor%20to%20specify%20the%20co-ordinates%20for%20the%20combo%20box%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CPRE%20style%3D%22background-color%3A%20%23f5f5f5%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20line-height%3A%201.4285%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20word-break%3A%20break-all%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%20%20%20%20%20%20%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Epublic%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20MyPage()%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EComboBox%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20comboBox1%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20comboBox1%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Enew%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20System.Windows.Forms.%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EComboBox%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E()%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20comboBox1.Location%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Enew%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20System.Drawing.%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EPoint%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E(20%2C%2020)%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20comboBox1.Name%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23ff00ff%3B%22%3E%22comboBox1%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20comboBox1.Size%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Enew%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20System.Drawing.%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3ESize%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E(121%2C%2021)%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20comboBox1.TabIndex%20%3D%200%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Ethis%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E.Controls.Add(%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%232b91af%3B%22%3Ethis%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E.comboBox1)%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%20%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ENow%2C%20imagine%20if%20you%20want%20to%20add%20TextBoxes%2C%20Buttons%2C%20et%20al%2C%20and%20define%20the%20event%20handlers%20such%20as%20to%20handle%20button%20click%2C%20how%20much%20time%20you%20would%20invest%20in%20designing%20this%20manually%3F%20Don%E2%80%99t%20you%20love%20dragging%20and%20dropping%20controls%20to%20create%20your%20ModulePage%20as%20a%20so-called%20Windows%20Form%3F%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EDon%E2%80%99t%20worry!%20I%E2%80%99ve%20an%20easy%20way%20to%20overcome%20this%20difficulty.%20Read%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22http%3A%2F%2Fblogs.iis.net%2Frakkimk%2Farchive%2F2008%2F03%2F05%2Fiis7-making-iis7-manager-ui-extension-development-easier-little-vs-trick.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20earlier%20blog%20of%20mine%3C%2FA%3E%20where%20I%20explain%20this%20little%20VS%20trick%20to%20minimize%20your%20development%20time%20to%20design%20this%20UI%20extension.%20But%20come%20back%20to%20this%20blog%20after%20visiting%20that%2C%20I%E2%80%99m%20going%20to%20further%20discuss%20how%20to%20display%20the%20available%20application%20pools%20on%20the%20combo%20box%2C%20and%20going%20to%20provide%20a%20button%20to%20say%20the%20selected%20application%20pool%20to%20recycle.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EAnd%2C%20my%20IIS%20UI%20extension%20looks%20like%20below%20now%3A%3C%2FP%3E%0A%3CBLOCKQUOTE%20style%3D%22border-left-color%3A%20%23eeeeee%3B%20border-left-style%3A%20solid%3B%20border-left-width%3A%205px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2017.5px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%2010px%2020px%2010px%2020px%3B%20margin%3A%200px%200px%2020px%200px%3B%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin%3A%200px%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_10.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CIMG%20width%3D%22514%22%20height%3D%22255%22%20title%3D%22image%22%20style%3D%22border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20height%3A%20auto%3B%20max-width%3A%20100%25%3B%20vertical-align%3A%20middle%3B%20border%3A%200px%20none%20currentColor%3B%22%20alt%3D%22image%22%20src%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fwebtopics%2FWindowsLiveWriter%2FIIS7WritingyourfirstcustomUImodulewithal_59FF%2Fimage_thumb_4.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EIf%20you%20do%20not%20see%20the%20below%20after%20you%E2%80%99ve%20designed%20using%20Visual%20Studio%20using%20the%20above%20method%2C%20you%20might%20also%20want%20to%20verify%20is%20the%20InitializeComponent()%20method%20is%20called%20in%20the%20constructor%20%E2%80%93%20that%E2%80%99s%20the%20function%20where%20all%20your%20stuffs%20get%20added%20to%20the%20form%20(ModulePage).%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ENow%2C%20let%E2%80%99s%20write%20a%20method%20which%20would%20fill%20the%20combo%20box%20with%20all%20the%20application%20pools%20that%20are%20available%20by%20reading%20the%20IIS%20configuration%20store%20using%20Microsoft.Web.Adminsitration.%20Let%E2%80%99s%20name%20our%20function%20as%20LoadAppPoolInfo()%2C%20and%20call%20that%20from%20our%20constructor%20after%20calling%20InitializeComponent()%20method.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EYour%20code%20should%20look%20like%20below%3A%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23808080%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20margin-left%3A%204px%3B%20margin-right%3A%204px%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20padding%3A%200px%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%23ffffff%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20black%3B%20left%3A%20-2px%3B%20position%3A%20relative%3B%20top%3A%20-2px%3B%20border%3A%201px%20solid%20%232e595c%3B%22%3E%0A%3CDIV%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20%233f73b6%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%2050%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20box-sizing%3A%20border-box%3B%20color%3A%20white%3B%20width%3A%20100%25%3B%20border%3A%201px%20solid%20blue%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20width%3A%20100%25%3B%22%3EAdded%20a%20ServerManager%2C%20and%20modified%20the%20constructor%20to%20call%20LoadAppPoolInfo()%20and%20defined%20that%20as%20well%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CPRE%20style%3D%22background-color%3A%20%23f5f5f5%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20line-height%3A%201.4285%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20word-break%3A%20break-all%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%20%20%20%20%20%20%20%20Microsoft.Web.Administration.%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3EServerManager%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20manager%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Enew%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20Microsoft.Web.Administration.ServerManager()%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Epublic%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20MyPage()%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20InitializeComponent()%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20LoadAppPoolInfo()%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Eprivate%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20LoadAppPoolInfo()%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Eforeach%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20(Microsoft.Web.Administration.WorkerProcess%20a%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3Ein%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23000000%3B%22%3E%20manager.WorkerProcesses)%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20comboBox2.Items.Add(a.AppPoolName)%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EAnd%2C%20your%20UI%20extension%20should%20now%20display%20the%20available%20application%20pools%20in%20the%20combo%20box.%20Go%20ahead%20and%20add%20a%20button%20click%20event%20handler%20for%20the%20button%20which%20you%E2%80%99ve%20already%20put%20inside%20our%20ModulePage%20like%20below%3A%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20style%3D%22background-color%3A%20%23f5f5f5%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.4285%3B%20orphans%3A%202%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20pre%3B%20word-break%3A%20break-all%3B%20word-spacing%3A%200px%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20%20%20%20%20%20%20%20private%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20button1_Click(%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3Eobject%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20sender%2C%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23a31515%3B%22%3EEventArgs%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%230000ff%3B%22%3E%20e)%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20manager.ApplicationPools%5BcomboBox2.SelectedItem.ToString()%5D.Recycle()%3B%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%20%20%20%20%20%20%20%20%7D%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ENow%2C%20go%20ahead%20and%20play%20with%20all%20the%20classes%20in%20Microsoft.Web.Administration%20to%20make%20your%20own%20modules%20to%20do%20a%20lot%20more%20than%20what%E2%80%99s%20provided%20in%20the%20default%20IIS7%20manager%20UI.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSTRONG%3EAuthor%3A%20Rakki%20Muthukumar%3C%2FSTRONG%3E%3C%2FP%3E

You should follow this article on IIS.net to create your first “simple” IIS7 UI extension which would just display a message box when loaded.

In this blog, I’m going to explain you how you could design a UI module where you can add any UI control that you might add to a WinForm.

Basically, the UI which appears in the middle pane is just an extension of Windows Form, and you can easily design that using Visual Studio. For example, the below “SSL settings” page has few checkboxes, radio buttons, and Apply/Cancel on the Actions pane.

image

All your controls should be placed or added into a class within your assembly which should derive from Microsoft.Web.Management.Client.Win32.ModulePage.

Before we start adding a class deriving from ModulePage, please make sure you have completed your Module and ModuleProvider classes by following this article, and also make sure your assembly would be put in GAC. Your project should look like below with DemoKey.snk, and also the proper references to the Microsoft.Web.Management, and Microsoft.Web.Administration:

image

 

Adding a ModulePage

Add a new class to the existing project, and name it as MyPage.cs. Derive the class from Microsoft.Web.Management.Client.Win32.ModulePage. Now, let’s try to add some code which runs when this ModulePage runs – let’s put a MessageBox on the constructor.

Below is how my code looks now:

 

Code Snippet displaying a simple message box
using System;
using System.Windows.Forms;
using Microsoft.Web.Management.Client.Win32;

namespace MyIIS7UIExtensions
{
internal class MyPage : ModulePage
{
public MyPage()
{
MessageBox.Show("Testing this!!!!");
}
}
}

You should build the assembly, and put it in the assembly (dll) in the GAC, and add the below to your administrationHost.config:

<moduleProviders>

       <add name="MyIIS7UIExtensions" type="MyIIS7UIExtensions.MyModuleProvider, MyIIS7UIExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db9daa3d2ea5f6fd" />

........

</moduleProviders>

<modules>

      <add name="MyIIS7UIExtensions" />

.........

</module>

You should see the below in your IIS manager.

image

If you double click on the “MyIIS7UIExtensions”, you should see the below message box, and if you click OK, then you would see the whole UI, but no controls. Just because you haven’t added them still J

clip_image008

image

If you get to this stage, then you are almost there in making your real IIS7 UI extension, rest of the steps are really easy if you are a windows forms programmer.

Adding Winform controls to our UI Extension

Let’s say you want to have a combo box listing all the application pools that are available. How to design that? First, you have to add the combo box inside your ModulePage.

 

        public MyPage()
{
this.Controls.Add(new ComboBox());
}

The above code will add a new combo box. But, you want to really specify how it should appear, and its co-ordinates, don’t you?

 

Modified constructor to specify the co-ordinates for the combo box
       public MyPage()
{
ComboBox comboBox1;
comboBox1 =
new System.Windows.Forms.ComboBox();
comboBox1.Location =
new System.Drawing.Point(20, 20);
comboBox1.Name =
"comboBox1";
comboBox1.Size =
new System.Drawing.Size(121, 21);
comboBox1.TabIndex = 0;
this.Controls.Add(this.comboBox1);
}

Now, imagine if you want to add TextBoxes, Buttons, et al, and define the event handlers such as to handle button click, how much time you would invest in designing this manually? Don’t you love dragging and dropping controls to create your ModulePage as a so-called Windows Form?

Don’t worry! I’ve an easy way to overcome this difficulty. Read this earlier blog of mine where I explain this little VS trick to minimize your development time to design this UI extension. But come back to this blog after visiting that, I’m going to further discuss how to display the available application pools on the combo box, and going to provide a button to say the selected application pool to recycle.

And, my IIS UI extension looks like below now:

image

If you do not see the below after you’ve designed using Visual Studio using the above method, you might also want to verify is the InitializeComponent() method is called in the constructor – that’s the function where all your stuffs get added to the form (ModulePage).

Now, let’s write a method which would fill the combo box with all the application pools that are available by reading the IIS configuration store using Microsoft.Web.Adminsitration. Let’s name our function as LoadAppPoolInfo(), and call that from our constructor after calling InitializeComponent() method.

Your code should look like below:

 

Added a ServerManager, and modified the constructor to call LoadAppPoolInfo() and defined that as well
        Microsoft.Web.Administration.ServerManager manager = new Microsoft.Web.Administration.ServerManager();
public MyPage()
{
InitializeComponent();
LoadAppPoolInfo();
}

private void LoadAppPoolInfo()
{
foreach (Microsoft.Web.Administration.WorkerProcess a in manager.WorkerProcesses)
comboBox2.Items.Add(a.AppPoolName);
}

And, your UI extension should now display the available application pools in the combo box. Go ahead and add a button click event handler for the button which you’ve already put inside our ModulePage like below:

 

        private void button1_Click(object sender, EventArgs e)
{
manager.ApplicationPools[comboBox2.SelectedItem.ToString()].Recycle();
}

Now, go ahead and play with all the classes in Microsoft.Web.Administration to make your own modules to do a lot more than what’s provided in the default IIS7 manager UI.

Author: Rakki Muthukumar