Our Ironclad Guarantee
You must be satisfied. Try our print books for 30 days or our eBooks for 14 days. If they aren't the best you've ever used, you can return the books or cancel the eBooks for a prompt refund. No questions asked!
If you know how to create Windows applications using C#, you’re ready to learn Web Forms programming with our classic ASP.NET book. It will get you off to a fast start whether or not you have done any web programming. It will teach you the skills you need to develop bullet-proof web applications on the job. And when you’re done, this book does double duty as the best on-the-job reference that money can buy.
Go to our instructor’s site to learn more about this book and its instructor’s materials.
Simply put, Murach’s ASP.NET is a great book. The author does a fantastic job of walking readers through the fundamentals, making the process feel like you’re sitting down with a skilled instructor who’s moving you from one example to the next."
To get you off to a fast start, this 5-chapter section shows you how to use Visual Studio to design, code, and test multi-page Web Forms applications that get database data and manage session state. Along the way, you’ll see where HTML5/CSS3 and Bootstrap fit in, so you can tweak that code as needed. This is the essence of ASP.NET Web Forms programming, and this prepares you for rapid progress in the sections that follow.
This section teaches you how to use the rest of the server and validation controls that aren’t covered in section 1…more about state management…how to build and format pages using master pages…more about using Bootstrap for responsive design…how to make a site easy for users to navigate…and how to use friendly URLs that improve search engine results. These are the features that you’ll use all the time.
In this section, you’ll learn how to use SQL data sources and five ASP.NET controls…GridView, DetailsView, FormView, ListView, and DataPager…to develop professional database applications with little or no C# code. Then, you’ll learn how to use object data sources and model binding with the Entity Framework to create 3-layer applications that separate the presentation code from the data access code.
In this section, you’ll learn skills for polishing up your ASP.NET applications. Like: how to secure an application…how to authenticate users with ASP.NET Identity…how to handle back-button refreshes…how to send email…and how to deploy a web application on a remote web server.
This section shows you how to use ASP.NET Ajax to develop rich Internet applications. It shows you how to create and consume WCF and Web API services. And it introduces you to ASP.NET MVC, a completely different approach to web programming than Web Forms.
If you have a core set of C# programming skills...the kind you get from a book like Murach’s C# 2015...you’re ready for this book. In fact, we’re confident that it will teach you ASP.NET faster and better than any competing book. That’s true whether you’re new to web programming or whether you’re coming to it with a background in another server-side language.
This edition adds information about how to use Bootstrap, a framework for designing websites and web applications that’s especially useful for responsive design. You’ll find a brief early tutorial in chapter 3 on the Bootstrap grid system and how to work with forms. Then, chapter 10 is devoted to teaching how to make Bootstrap work with ASP.NET.
This edition adds a chapter to the database programming section (chapter 18) that shows how to use model binding with the Entity Framework. This allows binding of a data control like a GridView control directly to an object in the Entity Data Model, rather than having to use a SqlDataSource or ObjectDataSource control.
In the 4.5 book, the chapter on authentication focused on the Membership system and the Web Site Administration Tool, but these are gone in Visual Studio 2015. So this chapter now focuses on how to use ASP.NET Identity, which is the replacement for the Membership system.
Although the new Identity system is extremely versatile, it can also be hard to understand. So the 4.6 book focuses on what you need to know to use Identity to authenticate users and work with roles.
The earlier editions of this book showed how to develop web site projects because they were simpler. Now, however, Microsoft recommends web application projects for new development…and some features like FriendlyUrls are available only in web application projects. So the 4.6 book focuses on how to work with web application projects.
This edition adds a discussion about how to use BrowserLink and the Diagnostic Tools window in the debugging chapter.
Bootstrap doesn’t work very well with ASP.NET themes, so the chapter on themes (the old chapter 10) has been removed from this edition.
The routing chapter in this edition adds a discussion about how to use the FriendlyUrls feature and how to integrate it with ASP.NET routing (they are two different systems, and it can take some tinkering to get them to play well together).
Also, the menu server controls don’t work well with Bootstrap, so they’ve been removed from this chapter. The Bootstrap chapter, though, shows how to work with navbars and breadcrumbs. Configuration and deployment Since the Web Site Administration Tool is gone in Visual Studio 2015, that part of the deployment chapter has been dropped. Now, the deployment focus is on how to use the one-click publish feature.
To develop ASP.NET Web Forms applications, you can use any of the full editions of Visual Studio 2015. These editions come with everything you need, including Visual Studio, C# 2015, a built-in web server called IIS Express that’s ideal for testing ASP.NET applications on your own computer, and a scaled-back version of SQL Server called SQL Server Express LocalDB.
For a no-cost alternative to the commercial packages, you can download Visual Studio 2015 Community Edition from Microsoft’s website for free. It too provides all of the items listed above, it’s a terrific product for learning how to develop ASP.NET applications, and both the applications and the skills that you develop with it will work with any of the full editions of Visual Studio.
Murach’s C# (7th Edition) is the perfect companion to our ASP.NET 4.6 book. It presents the C# programming skills that you need for developing ASP.NET Web Forms applications. It works for beginners as well as professionals. It lets you learn new skills whenever you need them. And it’s the best on-the-job reference that money can buy.
"Simply put, Murach’s ASP.NET is a great book. The author does a fantastic job of walking readers through the fundamentals, making the process feel like you’re sitting down with a skilled instructor who’s moving you from one example to the next."
-- Muhammad Riaz, Baton Rouge Oracle User Group
"Another awesome book from Murach. I have always been a fan of Murach’s books; I learn so much more from them than any other tech books out there. The format makes learning new materials easier, and their code examples WORK."
-- Posted at an online bookseller
"Great book. Probably the best there is on learning ASP.NET C#. Seriously. I’m hard to please, and as a programmer and engineer, I was surprised by how informative this book was."
-- Posted at an online bookseller
"To move forward and create a web application that can do real work beyond page turning, such as storing data in a database, validating input data, and sending email, requires not only HTML, but also JavaScript, light database design, Transact-SQL scripting, and more complex deployment strategies. It also requires the developer to understand the architecture of a web application as compared to the architecture of a web site. Murach’s ASP.NET Web Programming with C# provides the learner and the more experienced programmer with all that and more."
--Eric Notheisen, Enterprise Developers Guild
View the table of contents for this book in a PDF: Table of Contents (PDF)
Click on any chapter title to display or hide its content.
Two pages of a Shopping Cart application
The components of a web application
How static web pages are processed
How dynamic web pages are processed
The two main ASP.NET technologies
The two main types of Web Forms projects
Three environments for developing ASP.NET applications
The components of the .NET Framework
How state is handled in ASP.NET applications
The user interface for the Future Value application
The files used by the Future Value application
The aspx code for the Default form
The C# code for the Default form
How to start a new web application
How to work with the web application templates
How to add a web form to a web application
How to work with the Visual Studio IDE
How to add folders and files to a web application
How to open and close a web application
How to enter the HTML for a web form
How to add a table to a form
How to add text to the cells of a table
How to add web server controls to a form
How to set the properties of the controls
Common properties for web server controls
An introduction to the validation controls
How to use the required field validator
How to use the range validator
How to work with unobtrusive validation
The aspx code for the Future Value form
How to use the Code Editor
How to use page and control events
The C# code for the Future Value form
How to run a web application
How to view the HTML that’s sent to the browser
The user interface
The HTML that’s generated for a new form
The aspx code for the application
The CSS style sheet for the application
How to code HTML elements
How to use the HTML5 semantic elements
How to use the div and span elements with HTML5
How to provide CSS styles for an HTML page
How to code the basic CSS selectors
How to code CSS rule sets and comments
How to ensure cross-browser compatibility
How to use the features for entering HTML
How to add the attributes for the WAI-ARIA accessibility standards
How to create and edit an external style sheet
The responsive user interface of the Future Value application
How to add Bootstrap to your web application
The classes of the Bootstrap grid system
How the Bootstrap grid system works
How to work with the Bootstrap CSS classes for forms
How to work with the Bootstrap CSS classes for other HTML elements
The aspx code for the application
The custom CSS for the application
The two pages of the Shopping Cart application
The files and folders used by the Shopping Cart application
How to change the starting page for a web application
How to rename or delete folders and files
How to add a class to a web application
How to redirect or transfer to another page
How to use cross-page posting
How to code absolute and relative URLs
How to create a SQL data source
How to configure a SQL data source
How to bind a drop-down list to a data source
How to use C# code to get data from a data source
How session state works
How to work with data in session state
The members of the three business classes
The C# code for the Product class
The C# code for the CartItem class
The C# code for the CartItemList class
The aspx code for the Order page
The C# code for the Order page
The aspx code for the Cart page
The C# code for the Cart page
The custom CSS for the Shopping Cart application
How to test a web application
How to use Browser Link to test a web application in multiple browsers
How to use the browser’s developer tools
How to use the Exception Assistant
How to use breakpoints
How to use tracepoints
How to work in break mode
How to use the debugging windows to monitor variables
How to use the Diagnostic Tools window to monitor performance
How to debug client-side code
How to enable the trace feature
How to interpret trace output
How to create custom trace messages
The server controls you’ll use the most
How to use C# to work with the data in server controls
How to set the focus, default button, tab order, and access keys for a form
How to use labels and text boxes
How to use check boxes and radio buttons
How to use image and hyperlink controls
How to use the file upload control
How to use buttons, link buttons, and image buttons
How to use the Command event
How to create drop-down lists and list boxes
How to use the properties for working with list controls
How to use the members for list item collections
How to use check box lists and radio button lists
How to use bulleted lists
The user interface
The aspx code
The code-behind file for the CheckOut page
When and how to use the other standard server controls
How to use the Wizard control
How ASP.NET processes the validation controls
How to set the properties of the validators
How to provide for unobtrusive validation
How to use the required field validator
How to use the compare validator
How to use the range validator
How to use the regular expression validator
How to create regular expressions
How to use a custom validator
How to use the validation summary control
How to use validation groups
The user interface
The aspx code
The C# code
How to work with view state
How to use view state for your own data
How to work with session state
When to save and retrieve session state items
Options for storing session state data and tracking session IDs
How application state and caching work
How to work with application state and cache data
How to work with application events
How to create cookies
How to work with cookies
How to enable or disable cookies
How to use URL encoding
An application that uses cookies, application state, and caching
The Order and CheckOut pages
The critical C# code for the Order and CheckOut pages
An introduction to master pages
How to create a master page
How to work with the ClientIDMode attribute
How to create a content page
How to add content to a page
How to add default content to a master page
How to display and override the default content on a content page
How to expose a public property in a master page
How to access a public property from a content page
The aspx code for the master page
The code-behind file for the master page
The aspx code for the Order page
The aspx code for the Cart page
The Load event handler in the code-behind file for the Cart page
How to work with the CSS classes for buttons
How to work with the CSS classes for check boxes and radio buttons
How to work with the CSS classes for images
How to work with the CSS classes for lists
How to work with the CSS classes for HTML tables
How to work with the CSS classes for text
How to work with the CSS classes that provide context
How to work with glyphicons
How to work with badges
How to work with button groups
How to work with button dropdowns
How to work with list groups
How to work with alerts
How to work with breadcrumbs
How to work with thumbnails
How to work with navs
How to work with default navbars
How to work with static, fixed, and inverse navbars
How to work with the bootstrap-theme style sheet
How to change your Bootstrap theme
How to work with HTML elements on the server
How to use the Literal control to render HTML
How to use the Repeater control to render HTML
What is a friendly URL?
Two benefits of friendly URLs
How to install and set up FriendlyUrls
How to work with FriendlyUrls
How to work with file paths
How to change the default behavior of FriendlyUrls
The aspx code for FriendlyUrls in the Shopping Cart application
The C# code for FriendlyUrls in the Shopping Cart application
How to use friendly URLs with ASP.NET routing
How to create a custom route collection
How to work with route parameters
The aspx code for ASP.NET routing in the Shopping Cart application
The C# code for ASP.NET routing in the Shopping Cart application
How to create route collections
How to retrieve URL parameters
How to get ASP.NET routing to handle some or all URLs
The C# code for the Shopping Cart application
that combines FriendlyUrls and ASP.NET routing
How a table is organized
How the tables in a database are related
How the columns in a table are defined
The design of the Halloween database
How to query a single table
How to join related data from two or more tables
How to add, update, and delete data in a table
How to work with views
How to work with stored procedures
How the basic ADO.NET components work
Concurrency and the disconnected data architecture
How to work with data without using a data adapter
How the SqlDataSource control works
How to choose a data source type
How to choose a data connection
How to create a connection
How to save the connection string in the Web.config file
How to configure the SELECT statement
How to create a WHERE clause
How select parameters work
How to enter custom statements
How to select stored procedures
How to create a SELECT statement with the Query Builder
How to define the parameters
How the DataList control works
How to define the templates for a data list
How to format a data list
How to bind a list control to a data source
How to bind the controls in a template
The user interface
The aspx file
How to create a data source that can update the database
How to change the data source mode
How to use caching
How the GridView control works
How to define the fields in a GridView control
Elements used to create and format fields
How to use Bootstrap CSS classes to format a GridView control
How to enable sorting
How to enable paging
How to customize paging
The Product List application
The aspx file
The code-behind file
How to work with command fields
How to use events raised by the GridView control
How to insert a row in a GridView control
The Category Maintenance application
The aspx file
The code-behind file
How to create template fields
The template version of the Category Maintenance application
The aspx code for the template version
An introduction to the DetailsView control
Properties and child elements for the DetailsView control
How to define the fields in a DetailsView control
How to enable paging
How to create a Master/Detail page
An introduction to command buttons
How to add command buttons
How to use events raised by the DetailsView control
How to create template fields
The operation of the application
The aspx file
The code-behind file
An introduction to the FormView control
How to work with the Item template
How to work with the EditItem and InsertItem templates
The operation of the application
The aspx file for the Order page
The code-behind file for the Order page
An introduction to the ListView control
How to configure a ListView control
How to work with the Layout template
How to work with the Item template
How to provide for sorting
How to provide for paging
How to customize paging
How to group ListView data
The Product List application
The aspx file
How to use buttons to perform update operations
How to work with the EditItem and InsertItem templates
How to use events raised by the ListView control
How 3-layer applications work in ASP.NET
How to create and work with ADO.NET classes
How to use the ObjectDataSource control
How to configure an ObjectDataSource control
How to work with bound controls
The aspx file
The ProductDB class
How to design a data access class
How to create a select method
How to create update, delete, and insert methods
How to use attributes to mark a data access class
The design
The aspx file
The code-behind file
The Category class
The CategoryDB class
How to configure an ObjectDataSource control for paging and sorting
The aspx file that provides for paging and sorting
The code-behind file that executes the initial sort
How to create a data access class that provides for paging and sorting
How to start an Entity Data Model with the Entity Data Model Wizard
How to choose the version and data objects
How to work with the Entity Data Model Designer
How to retrieve data from a single table
How to load related objects
How to update an existing row
How to delete an existing row
How to provide for concurrency
How to add a new row
How to select data
How to use IntelliSense to work with model binding
How to filter data
How to provide for sorting and paging
The aspx file
The code-behind file
How to provide for updates, inserts, and deletes
The starting code that’s generated for update, insert, and delete methods
How to complete the methods for updating, inserting, and deleting data
How to handle concurrency and data validation exceptions
How to use a data access class with model binding
The operation of the application
The methods used for binding
The aspx file
The code-behind file
The ProductDB class
How to create a Code First model from an existing database
How to work with data annotations
How to store data annotations in a separate file
How secure connections work
How digital secure certificates work
How to enable TLS/SSL for a project that uses IIS Express
How to request a secure connection
How to force a page to use a secure connection
The operation of the Shopping Cart application
The code for the Shopping Cart application
Three types of authentication
How individual user account authentication works
An introduction to ASP.NET Identity
How to start a web application from the Web Forms template
How to work with the LoginView and LoginStatus controls
How to register a user
How to log in a user
How to change a user’s password
How to change basic configuration options
An introduction to access rules and roles
How to define access rules
How an application adds objects to the OwinContext object
How to modify an application to use roles
How to work with the users and roles
The user interface
The Web.config files
The aspx code for the users GridView control
and the connection string for the application
The code-behind file for the Maintenance page
How to use Code First migrations
How to work with migration files
How to use the Seed method to add initial data to the database
An introduction to email
How to use a third-party SMTP server
How to create an email message
How to send an email message
How to add an attachment to an email message
How to create an HTML message
How to create an HTML message with an embedded image
An introduction to custom error handling
How to get and use the Exception object for an error
How to create a custom class for handling exceptions
How to handle HTTP errors with the Web.config file
An introduction to the back-button problem
How to use the Post-Redirect-Get pattern
How to use timestamps
How to work with the Publish Web wizard
How to work with publish profiles
How to set the file publish options
How to define the connection
The published files
How to define the connection
How to set the database options
How to preview the files to be published
The published files
Examples of Ajax applications
How Ajax works
How ASP.NET Ajax works
The ASP.NET Ajax server controls
The ASP.NET Ajax Control Toolkit
How to use the ScriptManager control
How to use the ScriptManagerProxy control
How to use the UpdatePanel control
How to use the Timer control
How to use the UpdateProgress control
The View Products page
The ProductView class
The ProductViewList class
The aspx file and the first UpdatePanel control
The second UpdatePanel control
The code-behind file
SOAP services
REST services
How to start a WCF service application
How to code a service contract interface and a data contract class
How to code a service contract class that implements the interface
How to view and test a WCF service
The Edit Categories page of the WCF client web application
How to add a WCF service reference to a client web application
How to consume a WCF service
How to start a Web API service
How to write a web service controller
How to view and test a Web API service
The Edit Categories page of the Web API client web application
How to consume a Web API service using jQuery
How to consume a Web API service using C# code
The MVC design pattern
The Shopping Cart as an MVC application
How to start an ASP.NET MVC application
The folders and files for a new MVC application
The Razor view engine and syntax
How to work with routing
How to create a model
How to create a controller
How to create a view
How to work with layout views
How to work with regular views
How to work with strongly-typed views
How to work with controls
How to work with redirection
How to add AutoPostBack functionality with jQuery
How to work with the FormCollection object
How to work with model binding
How to download and install the files for this book
How to install Visual Studio 2015
How to use the Halloween database
How to set up IIS on your local computer
This chapter gives you the background you need to start writing ASP.NET 4.6 Web Forms applications of your own. So you’ll find out how web applications work, what software you need to develop them, and how the code that represents the design of a web form is coordinated with the C# code that makes the web form work the way you want it to.
This chapter teaches you how to use Visual Studio 2015 to design, code, and test a one-page web application. That means you’ll see how to build a web form using web server controls and HTML server controls, how to check for acceptable user input using validation controls, and how to write the C# code for the web form’s code-behind file.
Chapter 1 PDF (2.3Mb) Download Now
Chapter 2 PDF (1.9Mb) Download Now
This download is referred to in the book as ac46_allfiles.exe. It’s been split into two because of its size.
The file named ac46_allfiles_bookapps.exe contains:
The file named ac46_allfiles_exercises.exe contains:
The appendix in the book describes how to install and use these files.
Bookapps Exe file for Windows (439.4Mb) Download Now
Exercises Exe file for Windows (396.7Mb) Download Now
Bookapps Zip file* (439.4Mb) Download Now
Exercises Zip file* (396.7Mb) Download Now
*You can use the zip file if the exe file won’t work for you (for example, if your system blocks exe files)
To view the "Frequently Asked Questions" for this book in a PDF, just click on this link: View the questions
Then, if you have any questions that aren't answered here, please email us. Thanks!
There are no book corrections that we know of at this time. But if you find any, please email us, and we’ll post any corrections that affect the technical accuracy of the book here. Thank you!
For orders and customer service:
1-800-221-5528
Weekdays, 8 to 4 Pacific Time
If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.