-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
ASP.NET jQuery Cookbook (Second Edition) - Second Edition
By :
To create ASP.NET 4 .6 Web Applications, Visual Studio provides various ready templates such as Empty, Web Forms, MVC, Web API, and so on. This recipe will use the Empty template, which provides the developer with an empty project structure that consists of only the web.config file.
Downloading the example code
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Following are the steps to create a project by using Empty template:

Website or web project?
Instead of creating a new project, you can also create a new website. Unlike a project, a website does not contain a collective project file to track individual files in the application. To create a website, go to File | New | Web Site.... This will launch the New Website dialog box with the list of available templates. Select the ASP.NET Empty WebSite template.

WebApplication1 (or any suitable name) in the Name field. Click on the Browse button to go to the desired Location where you would like to save the application. Click on OK.

In the remaining recipes, when asked to create a Web Application project using the Empty template, follow the steps listed in this section.
Following are the steps to include jQuery using script block:

Scripts. Now, right-click on the Scripts folder, and go to Add | Existing Item... as shown in the following screenshot:

Default.aspx:
<script> tag in the <head> element:For development mode, the code is as follows:
<script src="Scripts/jquery-2.1.4.js"></script>
For release mode, the code is as follows:
<script src="Scripts/jquery-2.1.4.min.js"></script>

The Downloading jQuery from jQuery.com recipe
Change the font size
Change margin width
Change background colour