Step 1:
- Create a website named “Loading_sequence”.
Step 2:
- Add a Master Page named “MasterPage.master” within it by right-clicking on the website in “Solution Explorer” then choose “Add” -> “Add New Item”.
- Create some events in the “.cs” file of the Master Page and add a “response.write()” method with unique text for monitoring the process of execution.
protected void Page_PreInit(object sender, EventArgs e) { Response.Write("Master Page Pre Init event called <br/> "); } protected void Page_Init(object sender, EventArgs e) { Response.Write("Master Page Init event called <br/> "); } protected void Page_Load(object sender, EventArgs e) { Response.Write("Master Page Load event called <br/> "); }
Step 3:
- Add a Contents Page named “Default.aspx” within it by the right-clicking on the website in Solution Explorer then choose “Add” -> “Add New Item” and check the “Select master page” checkbox to attach the Master Page.
- Select the Master Page name that you want to attach.
- Create some events in the “.cs” file of the Contents Page and add a “response.write()” method with unique text by which we can monitor execution as written in the Master Page.
protected void Page_PreInit(object sender, EventArgs e) { Response.Write("Content Page Pre Init event called <br/> "); } protected void Page_Init(object sender, EventArgs e) { Response.Write("Content Page Init event called <br/> "); } protected void Page_Load(object sender, EventArgs e) { Response.Write("Content Page Load event called <br/> "); }
Step 4:
- Add a Web User Control named “WebUserControl.aspx” within it by right-clicking on the website in Solution Explorer then choose “Add” -> “Add New Item”.
- Create some events in the “.cs” file of the Web User Control and add a “response.write()” method with unique text for monitoring the execution as written in the Master Page and the Contents Page.
protected void Page_PreInit(object sender, EventArgs e) { Response.Write("User Control Pre Init event called <br/> "); } protected void Page_Init(object sender, EventArgs e) { Response.Write("User Control Init event called <br/> "); } protected void Page_Load(object sender, EventArgs e) { Response.Write("User Control Load event called <br/> "); }
Step 5:
- Add the Web User Control to the Contents Page then “Register Tag” and write the code to access the control by the “TagPrefix” and “TagName”.
Step 6:
- Run the website to see the output.
I hope this article helpful for you.
No #1 Recommended ASP.NET 5 Hosting
ASPHostPortal.com
ASPHostPortal.com is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.
HostForLIFE.eu
HostForLIFE.eu guarantees 99.9% uptime for their professional ASP.NET hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. Relibility, Stability and Performance of servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.
DiscountService.biz
DiscountService.biz is The Best and Cheap ASP.NET Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.