Free Online Courses for Software Developers - MrBool
× Please, log in to give us a feedback. Click here to login
×

You must be logged to download. Click here to login

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

Web Controls in ASP.Net (Calendar, Panel, MultiView, View and Wizard controls)

In this article we will discuss some web controls as Calendar, Panel, MultiView, View and Wizard controls.


The Calendar control

The calendar control is useful when you want to have calendar features on the page or help users input date or series of dates. The user can navigate between months and even years using the calendar control. The calendar control is represented using an <asp:Calendar> tag. It renders as an HTML <table> in the browser and uses in-built Javascript to assist date selection.

With the control there are various options which helps the user selction between a month, week , date or all the above:

  • Day - Allows selection of a single day
  • Week - Allows selection of a date or a week
  • DayWeekMonth - Allows selection of a single day, week or a whole month
  • None - No selection can be made

In addition to this the calendar control consists of a range of properties which helps you to format its look and behaviour.

The calendar control also exposes few events:

  • SelectionChanged - This is the primary event and is triggered when user selects a date on the control. You can access the selected dates via the SelectedDates property.
  • VisisbleMonthChanged - This causes a postback when the user selects a different month to be viewed

The calendar control can also be used to display schedule.

The Panel Control

The panel control is used as a control container. It is useful when you want to group controls and work then as a single unit. They can be really useful if you want to toggle the visibility of a set of controls.

In the source view the Panel Control is represented as <asp:Panel> and it is rendered as a <div> to the browser.

Here are some of the main properties of a panel control:

  • BackImageUrl - path to the background image of the panel control
  • HorizontalAlignment - Sets the horizontal alignment of the controls in the panel
  • Wrap - Specifies whether the items in the Panel automatically continue on the next line when the line is longer than the width of the panel
  • DefaultButton - Specifies the button that is clicked when user hits enter key on the keyboard. It can be set to any control on the form which implements IButtonInterface.

MultiView and View Controls

The MultiView and View controls are also container controls. The MultiView and View controls are meant to work together. A View control must be contained inside a MultiView control. A View consist of many controls and MultiView contains many View controls.

In the source a MultiView is represented as <asp:MultiView> and View is represented as <asp:View> The set of controls can be used to toggle the visibility of a set of controls. Only one View can be visible at any point of time. The ActiveViewIndex or SetActiveView can be used to change the view programmatically. If the ACtiveViewIndex is set to -1, no Views are displayed. If an invalid View or null is passed into SetActiveView method an HttpException is thrown.

As an example consider a multistep registration process, each step can be put into a View. The buttons can be set as command buttons. The CommandName property can be checked to determine which button has been clicked.

The Wizard Control

The Wizard control is used to create wizards. It provides functionality to ensure that only one step in the wizard is visible at one time. It is used to break down user input to logical chunks and the steps can be validated either at end of each step or at the end of the entire process.

The Wizard control contains a header area that can be customised to display information specific to the step which the user is engaged with. There is also a sidebar area to navigate between the steps and this can be programmatically controlled as well.

The built-in navigation capabilities determine which buttons are displayed. The BaseWizardStep class contains the StepType property which can be set to one of the WizardStepType enumeration values:

  • WizardStepTye.Auto - This is the default option. This renders navigation buttons based on the location of the step within the WiardSteps collection property of the Wizard control.
  • WizardStepTye.Complete - This is the last step to appear. No navigation buttons appear
  • WizardStepTye.Finish - This is the final data collection step, the Finish and Previus buttons are available.
  • WizardStepTye.Start - This is the first step to appear, only the Next button is rendered
  • WizardStepTye.Step - This is a step between Start and Finish steps. The Previous and Next buttons are rendered.

This is a summary of many of the special controls in ASP.Net. Hope you like the article.



I am a Senior Web Developer from London with over 5years of experience in ASP.NET, HTML, CSS. I am well versed in VB.Net, C# and SQL as well.

What did you think of this post?
Services
[Close]
To have full access to this post (or download the associated files) you must have MrBool Credits.

  See the prices for this post in Mr.Bool Credits System below:

Individually – in this case the price for this post is US$ 0,00 (Buy it now)
in this case you will buy only this video by paying the full price with no discount.

Package of 10 credits - in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download few videos. In this plan you will receive a discount of 50% in each video. Subscribe for this package!

Package of 50 credits – in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download several videos. In this plan you will receive a discount of 83% in each video. Subscribe for this package!


> More info about MrBool Credits
[Close]
You must be logged to download.

Click here to login