Microsoft training courses | Wise Owl - home page

Phone (01457) 858877 or email

Visual C# training | ASP.NET, WPF and WinForms

Our Visual C# courses show you how to:

  • Create data-driven ASP.NET websites
  • Build Windows Forms applications
  • Create WPF (Windows Presentation Foundation) systems

Here are some details of each of these courses!

Our Visual C# training page gives much more information about (and also more links to) our C Sharp training.

Visual C# for WPF applcations

WPF has replaced (at least as far as Microsoft are concerned) WinForms as the new way to create forms-based systems in .NET.  Here's a sample of some C# code that you'll learn to write on our 3-day WPF course for C#:

private void btnOrder_Click(object sender, RoutedEventArgs e)

{

// get the name of the drink

string DrinkName = txtDrink.Text;

 

// if no drink ordered, display message

if (DrinkName.Length == 0)

{

MessageBox.Show("No drink ordered");

txtDrink.Focus();

return;

}

 

// how many sugars

int Sugars;

// try converting input sugars to integer

try

{

Sugars = Convert.ToInt32(txtSugars.Text);

}

catch

{

Sugars = -1;

}

// if no sugars ordered, display message

if (Sugars == -1)

{

MessageBox.Show("You haven't ordered any sugars");

txtSugars.Focus();

return;

}

// finally, display order

MessageBox.Show("You have ordered a " +

DrinkName.ToUpper() + " with " +

Sugars.ToString() + " sugars",

"Order confirmation");

}

}

You'll also learn how to animate a bouncing ball!

Windows Forms for C#

For those with less time (or budget) on their hands, you might prefer to learn Windows Forms (here are some slightly biased thoughts on the differences betweeen WPF and Windows Forms).  Our 3-day WinForms for C# course will teach you how to write code including the following:

private void btnApply_Click(object sender, EventArgs e)

{

 

int AgeEntered = Convert.ToInt32(txtAge.Text);

 

// show age-appropriate message

if (AgeEntered < (int) AgeBand.Child) {

MessageBox.Show("Please join our youth club");

} else {

if (AgeEntered < (int) AgeBand.Young) {

MessageBox.Show("Please join our young people's club");

} else {

if (AgeEntered < (int) AgeBand.MiddleAged) {

MessageBox.Show("Please join our swingers' club");

} else {

if (AgeEntered < (int) AgeBand.SeniorCitizen) {

MessageBox.Show("Please join our senior citizens' club");

} else {

MessageBox.Show("Should you be doing this?");

 

}

You'll also, of course, learn how to create and code forms and menus!

ASP.NET for Visual C#

Finally, you can spend three days learning how to create ASP.NET websites in C#.  Here's an example of some code you'll learn on this course (this particular example handles an event for a gridview):

protected void gvFilms_RowDeleting1(object sender,

GridViewDeleteEventArgs e)

{

// if trying to delete, make sure it's not an Oscar winner

GridViewRow gvr = gvFilms.Rows[e.RowIndex];

 

// if film made since 2000, can't delete

int ReleaseDateColumn = Convert.ToInt32(gvColumn.ReleaseDate);

 

DateTime FilmDate = Convert.ToDateTime(

gvr.Cells[ReleaseDateColumn].Text);

 

if (FilmDate.Year >= 2000) {

divError.Visible = true;

divError.InnerText =

"You can't delete films made this century";

e.Cancel = true;

}

}

Along the way, you'll also learn about master pages, CSS style sheets, preserving state, validation controls and a great deal more.

All content copyright Wise Owl Business Solutions Ltd 2013. All rights reserved.