Logo

Navigation
  • Home
  • Services
    • ERP Solutions
    • Implementation Solutions
    • Support and Maintenance Solutions
    • Custom Solutions
    • Upgrade Solutions
    • Training and Mentoring
    • Web Solutions
    • Production Support
    • Architecture Designing
    • Independent Validation and Testing Services
    • Infrastructure Management
  • Expertise
    • Microsoft Development Expertise
    • Mobile Development
    • SQL Server Database and BI
    • SAP BI, SAP Hana, SAP BO
    • Oracle and BI
    • Oracle RAC
  • Technical Training
    • Learn Data Management
      • Business Intelligence
      • Data Mining
      • Data Modeling
      • Data Warehousing
      • Disaster Recovery
    • Learn Concepts
      • Application Development
      • Client Server
      • Cloud Computing Tutorials
      • Cluster Computing
      • CRM Tutorial
      • EDI Tutorials
      • ERP Tutorials
      • NLP
      • OOPS
      • Concepts
      • SOA Tutorial
      • Supply Chain
      • Technology Trends
      • UML
      • Virtualization
      • Web 2.0
    • Learn Java
      • JavaScript Tutorial
      • JSP Tutorials
      • J2EE
    • Learn Microsoft
      • MSAS
      • ASP.NET
      • ASP.NET 2.0
      • C Sharp
      • MS Project Training
      • Silverlight
      • SQL Server 2005
      • VB.NET 2005
    • Learn Networking
      • Networking
      • Wireless
    • Learn Oracle
      • Oracle 10g
      • PL/SQL
      • Oracle 11g Tutorials
      • Oracle 9i
      • Oracle Apps
    • Learn Programming
      • Ajax Tutorial
      • C Language
      • C++ Tutorials
      • CSS Tutorial
      • CSS3 Tutorial
      • JavaScript Tutorial
      • jQuery Tutorial
      • MainFrame
      • PHP Tutorial
      • VBScript Tutorial
      • XML Tutorial
    • Learn Software Testing
      • Software Testing Types
      • SQA
      • Testing
  • Career Training
    • Career Improvement
      • Career Articles
      • Certification Articles
      • Conflict Management
      • Core Skills
      • Decision Making
      • Entrepreneurship
      • Goal Setting
      • Life Skills
      • Performance Development
      • Personal Excellence
      • Personality Development
      • Problem Solving
      • Relationship Management
      • Self Confidence
      • Self Supervision
      • Social Networking
      • Strategic Planning
      • Time Management
    • Education Help
      • Career Tracks
      • Essay Writing
      • Internship Tips
      • Online Education
      • Scholarships
      • Student Loans
    • Managerial Skills
      • Business Communication
      • Business Networking
      • Facilitator Skills
      • Managing Change
      • Marketing Management
      • Meeting Management
      • Process Management
      • Project Management
      • Project Management Life Cycle
      • Project Management Process
      • Project Risk Management
      • Relationship Management
      • Task Management
      • Team Building
      • Virtual Team Management
    • Essential Life Skills
      • Anger Management
      • Anxiety Management
      • Attitude Development
      • Coaching and Mentoring
      • Emotional Intelligence
      • Stress Management
      • Positive Thinking
    • Communication Skills
      • Conversation Skills
      • Cross Culture Competence
      • English Vocabulary
      • Listening Skills
      • Public Speaking Skills
      • Questioning Skills
    • Soft Skills
      • Assertive Skills
      • Influence Skills
      • Leadership Skills
      • Memory Skills
      • People Skills
      • Presentation Skills
    • Finding a Job
      • Etiquette Tips
      • Group Discussions
      • HR Interviews
      • Interview Notes
      • Job Search Tips
      • Resume Tips
      • Sample Resumes
 

ASP.NET Web Pages and Layout

By Exforsys | on August 23, 2005 |
ASP.NET 2.0

ASP.NET Web Pages and Layout

In this tutorial you will learn how to Enable Users to Edit Pages and Change Layout, To create a user control that enables changing page layout, To enable users to change the layout and To test layout changes.

Enabling Users to Edit Pages and Change Layout

As stated earlier in this tutorial, Web parts facilitates the editing of Layout by users. Users can drag and drop controls by dragging them from one zone to another and the characteristics of controls can be edited. This functionality is inbuilt into the basic control set of the Web part. Custom controls can also be created that allow users edit the features. In this section of the tutorial we shall examine how this is done.

To create a user control that enables changing page layout

1. In Visual Studio, add a new user control in the same directory as the start.aspx file, and name the new file Menu.ascx.

2. Switch to Source view.

3. Remove the existing code in the new file, and paste in the following code. This user control code uses features of the Web Parts control set that enable a page to change its view or display mode, and also enables you to change the physical appearance and layout of the page while you are in certain display modes.

Click here to veiw sample code

4. Save the file.

To enable users to change the layout

1. Open the Start.aspx page, and switch to Design view.

2. Position the insertion point in the Design view just after the text you typed for the header of the page. Add a hard return after the text so that there is a blank line between the header and the WebPartManager control. Leave the insertion point positioned on the blank line.

3. Drag the user control you just created (the file is named Menu.ascx) into the start.aspx page and drop it next to the calendar control.

4. Drag an EditorZone control from the WebParts section of the Toolbox to the remaining open table cell in the start.aspx page.

5. From the WebParts section of the Toolbox, drag an AppearanceEditorPart control and a LayoutEditorPart control into the EditorZone control.

6. Switch to Source view. The resulting code in the table cell looks as follows.

Click here to veiw sample code

7. Save the Start.aspx file. You have created a user control that allows you to change display modes and change page layout, and you have referenced the control on the primary Web page.

To test layout changes

1. Load the page in a browser.

.

.

2. Click the Display Mode drop-down menu, and select Edit. The zone titles are displayed.

3. Now drag the tree view control and drop it into the main section.

4. Click the Display Mode drop-down menu, and select Browse. The tree view remains where you dropped it.

5. To demonstrate that personalization is working, close the browser, and then load the page again. The changes you made are saved for future browser sessions.

6. From the Display Mode menu, select Edit.

7. Each control on the page is now displayed with a downward arrow in its title bar, which contains the verbs drop-down menu.

8. Click the arrow to display the verbs menu on the tree view control. Click the Edit verb.

9. The EditorZone control appears, displaying the EditorPart controls you added.

10. In the Appearance section of the edit control, change the Title to Tree view control, use the Chrome Type drop-down list to select Title Only, and then click Apply. The following screen shot shows the page in edit mode.

11. Click the Display Mode menu, and select Browse to return to browse mode.

12. The control now has an updated title and no border, as shown in the following screen shot.

« « ASP.NET Using Web Parts and Controls in Web Pages
ASP.NET Personalization: User Profiles and Themes » »

Author Description

Avatar

Editorial Team at Exforsys is a team of IT Consulting and Training team led by Chandra Vennapoosa.

Ads

Free Training

RSSSubscribe 416 Followers
Ads
  • Popular
  • Recent
  • ASP.NET Creating Content for Master Page

    August 17, 2005 - 0 Comment
  • ASP.NET : Dynamic Image control

    September 16, 2005 - 0 Comment
  • ASP.NET Personalization: User Profiles and Themes

    August 23, 2005 - 0 Comment
  • Getting started with ASP.NET 2.0

    July 4, 2005 - 0 Comment
  • ASP.NET SqlDataSource Control

    September 6, 2005 - 0 Comment
  • ASP.NET Referencing Master Page Members

    August 17, 2005 - 0 Comment
  • ASP.NET Advanced Site Functionality

    September 16, 2005 - 0 Comment
  • ASP.NET Data Access features

    August 27, 2005 - 0 Comment
  • Introduction to Visual Studio.NET

    July 26, 2005 - 0 Comment
  • ASP.NET Data Bound Controls

    September 6, 2005 - 0 Comment
  • Application Development in .NET

    November 21, 2007 - 0 Comment
  • ASP.NET Advanced Site Functionality

    September 16, 2005 - 0 Comment
  • ASP.NET : Dynamic Image control

    September 16, 2005 - 0 Comment
  • ASP.NET Creating Web Wizards

    September 16, 2005 - 0 Comment
  • Displaying Master-Detail Data on Separate Pages in ASP.NET

    September 16, 2005 - 0 Comment
  • ASP.NET Displaying Master-Detail Data on the Same Page

    September 13, 2005 - 0 Comment
  • ASP.NET DataBound Controls – Details View

    September 13, 2005 - 0 Comment
  • ASP.NET Using a Grid to Display Detail Information

    September 13, 2005 - 0 Comment
  • ASP.NET Adding Sorting and Paging in GridView

    September 10, 2005 - 0 Comment
  • ASP.NET GridView Filtering

    September 10, 2005 - 0 Comment

Exforsys e-Newsletter

ebook
 

Related Articles

  • Application Development in .NET
  • ASP.NET Advanced Site Functionality
  • ASP.NET : Dynamic Image control
  • ASP.NET Creating Web Wizards
  • Displaying Master-Detail Data on Separate Pages in ASP.NET

Latest Articles

  • Project Management Techniques
  • Product Development Best Practices
  • Importance of Quality Data Management
  • How to Maximize Quality Assurance
  • Utilizing Effective Quality Assurance Strategies
  • Sitemap
  • Privacy Policy
  • DMCA
  • Trademark Information
  • Contact Us
© 2021. All Rights Reserved.IT Training and Consulting
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy
Necessary Always Enabled