Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 863481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:19:05+00:00 2026-05-15T09:19:05+00:00

I’ve been using ASP.NET (C#) for the past two years. I have learned so

  • 0

I’ve been using ASP.NET (C#) for the past two years. I have learned so much but there is still much more to learn 🙂

I’ve used MasterPages, ‘Web User Controls’ for things like headers, navigation, footers etc.

One thing I have never truly understood is the practice of using ‘Web User Controls’ for your content and logic;

Home.aspx ------ Home.ascx
AboutUs.aspx ----- AboutUs.ascx
Ordering.aspx ---- Ordering.acsx

I’ve been working with a few projects over the last few months that use this structure. I am aware that this is actually common practice but I don’t really understand the full benefits.

I remember when I tried this approach before and ended up having awful viewstate problems with controls like the Gridview… once I took all the logic out and placed it into a .aspx page everything worked fine.

I realise now that maybe I needed to add the Gridview to the viewstate collection… but this only reinforces my difficulty into understanding why this approach is used – given the viewstate problem.

I fully understand the advantages of ‘Web User Controls’ in relation to things like Headers, menus, footers etc… anywhere that involves duplication but the projects I’ve seen have pages/controls that are pretty specific – in other words its unlikely to be reused anywhere else – the aspx page just contains a control (.ascx) with the content and logic and it will only be used on that page, nowhere else.

Ignoring ‘Code Reuse’, what other benefits does this approach provide?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:19:05+00:00Added an answer on May 15, 2026 at 9:19 am

    I think your example of PageA.aspx -> PageA.ascx is actually a bad example for highlighting the benefits of web user controls. Take a step back from these “page” control examples and think of the main purpose of a web user control. They serve the purpose of encapsulating UI and functionality within a discrete block.

    The biggest benefit in my opinion is in knowing that if I develop something like a comments form once as a web user control and deploy it throughout my site pages that I have a single item to update in the solution which will update every page it exists upon.

    Another less obvious benefit is that many Content Management systems such as Umbraco use the web user control as plugins. That way you can develop plugins for the end user / editor to select and place into page content as they see fit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.