« Home « Chủ đề thủ thuật .net

Chủ đề : thủ thuật .net


Có 60+ tài liệu thuộc chủ đề "thủ thuật .net"

Lập trình .net 4.0 và visual studio 2010 part 41

tailieu.vn

http://jquery.com/. jQuery is used by some very big names such as Amazon, Google, Dell, IBM, and Slashdot (for a full list, please refer to http://docs.jquery.com/Sites_Using_jQuery).. The latest release is always available from jQuery’s home page at http://jquery.com/.. To provide intellisense support, a special file with the ending –vsdoc is used that describes jQuery’s functionality to Visual Studio. <script src="Scripts/jquery-1.3.2-vsdoc.js". jQuery’s...

Lập trình .net 4.0 và visual studio 2010 part 42

tailieu.vn

<script language="javascript">. </script>. .innerHTML="hello jQuery". Table 12-1. $(".standardDiv") Select all elements with a class of standardDiv.. $(".standardDiv")[0].innerHTML=. "hello jQuery";. Table 12-2. $("input[type=button]")[0].innerText="hello jquery2". Table 12-3. $(":button")[0].innerText="hello jquery2". Table 12-4. Table 12-5. The following code appends a p tag to the div with id of div1:. <script>$("<p>hello I am dynamically added text</p>").appendTo("#div1")</script>. <script>$("<p>hello I am dynamic text</p>").insertAfter("body")</script>. <script>$("<p>hello I am dynamic...

Lập trình .net 4.0 và visual studio 2010 part 43

tailieu.vn

The following code binds the hellojQuery() function to the click of the cmdTest button:. Go back to default.htm and change the helloJQuery() function to contain the following:. jquery.com/UI/Effects.. Refer to http://visitmix.com/lab/. This procedure can be easily accomplished with the following code:. $("#div1").fadeOut().fadeIn().fadeOut().fadeIn().fadeOut();. For example, to create a simple function that will pop up an alert box, you can do so...

Lập trình .net 4.0 và visual studio 2010 part 44

tailieu.vn

ASP.NET MVC. ASP.NET MVC is Microsoft’s implementation of a tried and tested architectural pattern. If you were to map these terms to a traditional ASP.NET/database application (and they don’t map exactly) you might consider the following:. So is MVC a replacement for web forms that you know and mostly love? Although some people will argue that ASP.NET MVC will replace...

Lập trình .net 4.0 và visual studio 2010 part 45

tailieu.vn

Figure 13-5. In the first example, you returned a view that matched the action name (Index). If you wanted to return the Index view you just created when the user navigates to an arbitrary address such as ~/Film/IWillAlsoReturnIndex, you can do this with the following code:. public ActionResult IWillAlsoReturnIndex(). You will shortly look at a better way of binding data...

Lập trình .net 4.0 và visual studio 2010 part 46

tailieu.vn

You have already utilized a number of attributes such as AcceptVerbs and Bind. Attributes extend ASP.NET MVC’s functionality and you can even create your own. You have already used the AcceptVerbs attribute to distinguish between load and update methods in the Film controller.. The standard template ASP.NET MVC project shows you how to use this. ASP.NET MVC and JavaScript. ASP.NET...

Lập trình .net 4.0 và visual studio 2010 part 47

tailieu.vn

namespace Chapter13.BobsMoviesMVC.Controllers. ASP.NET MVC allows the creation of reusable blocks of code called filters that intercept and process various types of requests. Of course, one of the biggest advantages of MVC is its testability, and no overview of ASP.NET MVC would be complete without looking at this functionality. using Chapter13.BobsMoviesMVC.Models;. namespace BobsMoviesMVC.Support. using Chapter13.BobsMoviesMVC.Controllers;. private BobsMoviesMVC.Support.FakeFilmRepository GetFakeRepository(). ASP.NET MVC V2....

Lập trình .net 4.0 và visual studio 2010 part 48

tailieu.vn

http://silverlight.net/content/GetStarted.aspx. Ability to use the .NET development tools you know and love. Utilize many of the .NET framework libraries in your applications (for security reasons, not everything is available). Although Silverlight was available for earlier versions of .NET and Visual Studio, I decided to include a brief introduction because Silverlight was released between VS2008 and VS2010, and I suspect that...

Lập trình .net 4.0 và visual studio 2010 part 49

tailieu.vn

Open the file ~\MainPage.xaml.. By default, MainPage.xaml will contain a Grid tag like the following:. <Grid x:Name="LayoutRoot". Background="White">. Enter the following between the Grid tags:. You should now have something like the following:. <UserControl x:Class="Chapter14.HelloSilverlight.MainPage". Background="White">. The following line tells the compiler which class to inherit from. (It is similar to ASP.NET’s inherits property in an .aspx or .ascx file.)...

Visual studio 2010 part 1

tailieu.vn

Understanding Visual Studio 2010 Essentials. Introducing Visual Studio 2010. Learn What Visual Studio 2010 Can Do for You. Understand What Types of Applications You Can Build. Y our first experience with Visual Studio (VS) 2010 is often installation. Once installation is complete, you’ll open VS for the first time and need to know how to navigate the VS environment;. this...

Visual studio 2010 part 2

tailieu.vn

The choice you make for default environment settings depends a lot on what language or environment you’ll use to write software in. This book covers both VB and C#, so you would most likely want to choose the setting specific to the language you will use. The examples in this book will use either VB or C# settings, depending on...

Visual studio 2010 part 3

tailieu.vn

Modifying Environment Settings after Setup. With VS open, select Tools | Import And Export Settings, which will start the Import and Export Settings Wizard shown in Figure 1-17.. From Figure 1-17, you can see the options to Export, Import, and Reset settings. Figure 1-17 Import and Export Settings Wizard. Chapter 1: Introducing Visual Studio 2010 23. Exporting Selected Environment Settings....

Visual studio 2010 part 4

tailieu.vn

30 Microsoft Visual Studio 2010: A Beginner’s Guide. Familiarization with Visual Studio Project Types. Visual Studio includes a plethora of project types, making it easy to build applications with premade templates. The following discussion will show how to find what project types are available and describe what those project types are.. To see what projects are available, select File |...

Visual studio 2010 part 5

tailieu.vn

Learning Just Enough C# or VB.NET:. T he .NET platform supports several different programming languages. Since all of the languages run on the same platform and share the same class libraries, language choice becomes a personal choice of preference. In other words, you can accomplish the same tasks, regardless of what programming language you use. With .NET, you have a...

Visual studio 2010 part 6

tailieu.vn

which you’ll see many times throughout this book. In reality you can name the class anything you want. Whatever names you choose should make sense for the purpose of the class.. A namespace name, however, precedes the class name, whereas your middle name and surname follow your first or given name. For example, guess where you can find .NET classes...

Visual studio 2010 part 7

tailieu.vn

There are various types of statements you can write with both C# and VB, including assignment, method invocations, branching, and loops. We’ll start off by looking at primitive types, such as integers and strings, and then I’ll show how to build expressions and set values by performing assignments. Then you’ll learn about branching statements, such as if and switch in...

Visual studio 2010 part 8

tailieu.vn

This chapter will specifically discuss the class type, which allows you to create your own custom types.. You’ll also see the value of a class when you learn about class members. You’ll see how the field, method, and property class members can be used. We’ll start with learning how to create and use classes.. You can also create your own...

Visual studio 2010 part 9

tailieu.vn

The carat will locate to the inside of the class block. You can divide your algorithms into blocks of code called methods. You’ve already used methods when coding Console.WriteLine, where WriteLine is a method of the Console class. To start off, I’ll show you a very simple method so that you can see the syntax and understand the program flow....

Visual studio 2010 part 10

tailieu.vn

Credit increases the value of currentBalance, and Debit decreases the value of currentBalance.. The implementations of Credit and Debit, respectively, increase and decrease the value of accountBalance. Since Credit and Debit are members of the same class as accountBalance, they’re allowed to read from and write to accountBalance.. Main invokes Credit and Debit to change the value of the accountBalance...

Visual studio 2010 part 11

tailieu.vn

Use Delegates and Events. I n previous chapters, you learned basic syntax and how to create your own types. Understanding Delegates and Events. For example, when the designers of the .NET Framework created user interfaces, they added reusable controls, such as buttons, list boxes, and grids. An event defines the type of notifications that a object can provide, and a...