ASP.NET: Other Topics of Interest

Validators can be attached to Form components to comb over user input and validate it before passing it along to be processed. They come in the following flavors:

  • RequiredFieldValidator: ensures the input field isn't empty.

  • RangeValidator: ensures an input value falls within a predetermined range.

  • CompareValidator: compares an input value to a fixed value or the value in another component.

  • RegularExpressionValidator: validates an input value by matching it against a regular expression.

  • CustomValidator: create your own validation method.


Similar to how PHP provides a solution for connecting a website to a database system, ASP.NET allows your webpages to connect to databases (of some relational database format), XML documents, "Business Objects", and flat files. You can even bind the data provided by a "query" form one of these data sources to a component in your webpage!

<asp:Calendar id="MyAdvisingCalendar" runat="server" />

Plugs in a well-defined calendar module on your webpage! You can even use something like MyAdvisingCalendar.TodaysDate.ToShortDateString() to get the current date, followed by SelectedDate to then highlight a date in the calendar.

MultiView is really great. This allows you to partition the content of a page into different groups, with only one group displayed at a time. With this, you could detect if the user is using Internet Explorer or Microsoft Edge and strip away all your content, save for a link to the page where they can download Mozilla Firefox (or Google Chrome) instead.

That sounds aggressive, but if you've ever experienced the frustration of building a beautiful website or developing some JavaScript to facilicate the fanciest of dynamic displays, only to realize it works on all browsers except IE, you would wholeheartedly endorse this attack.

Panels are functionally div containers, which might not mean much to you if you've never done web development before. In which case: Panels are great for dictating your webpage's layout!