Có 60+ tài liệu thuộc chủ đề "lập trình Visual"
tailieu.vn Xem trực tuyến Tải xuống
ASP.NET MVC controller actions. Add a new class called Person to the project and enter the following class definition:. Add a new .asmx web service to the project called GetData.asmx.. Add the following using directive to GetData.asmx.cs:. Uncomment the following attribute in the GetData class:. [System.Web.Script.Services.ScriptService]. [System.Web.Script.Services.ScriptMethod]. Copy the file dataviewProgrammatic.htm and rename the new copy as dataviewAsmx.htm.. Replace the...
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
<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...
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
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....
tailieu.vn Xem trực tuyến Tải xuống
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...
tailieu.vn Xem trực tuyến Tải xuống
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.)...
tailieu.vn Xem trực tuyến Tải xuống
block, enter the following:. Now go back to MainMenu.xaml and find the line where it says the following:. <TextBlock FontSize . Canvas.Left . Canvas.Top gt;Silverlight Demo</TextBlock>. Add the following attribute to this tag to reference the style you created in App.xaml:. Canvas.Top . This is normally due to the following:. Figure 14-6. You are probably expecting to be able to...
tailieu.vn Xem trực tuyến Tải xuống
Replace the Grid tags with the following XAML:. Open ~/Animation/Animation.xaml.cs and enter the following code:. StoryBoard.Completed. StoryBoard.Duration = TimeSpan.FromMilliseconds(10);. StoryBoard.Begin();. StoryBoard.Stop();. Add the code to load Animation.xaml when the animation button is clicked:. PageNavigator.LoadPage(new Animation.Animation());. Note that you incremented the Opacity value using the following code:. However, when you incremented the Left and Top properties, you had to increment the...
tailieu.vn Xem trực tuyến Tải xuống
<Image Source="myImage.jpg"></Image>. <Image Source="http://www.mysite.com/myImage.jpg"></Image>. Add the image to the Silverlight project.. Text=""Hello""></TextBlock>";. Background="White">. Source="/Robotica_720.wmv"></MediaElement>. <Button x:Name="cmdPlay". Content="Play"></Button>. <Button x:Name="cmdStop". Content="Stop"></Button>. <Button x:Name="cmdPause". Content="Pause"></Button>. <StackPanel Orientation="Vertical">. Height gt;</TextBox>. ></TextBox>
tailieu.vn Xem trực tuyến Tải xuống
Add the event handler code:. In addition to the standard Silverlight controls such as TextBox, Image, and ComboBox additional controls such as a DataGrid, Slider, and Calendar are available. Add a new folder called DataBinding to the example project.. In theXAML, you need to add a namespace reference to the assemblies you're going to use.. Add the following line in...
tailieu.vn Xem trực tuyến Tải xuống
Open ~/DataBinding/DataBindingTest.xaml.. Add the following XAML after the TextBox that has the x:name set to txtDeclaration:. <TextBlock>Change an object in list:</TextBlock>. Open DataBindingTest.xaml.cs and add a click event handler:. //Change an item in the list. Open DataBindingTest.xaml.. Add the following XAML after the cmdChangeTitle button (note that the binding mode is set to TwoWay now):. <TextBlock>Two way binding:</TextBlock>. Open DataBindingTest.xaml.cs....
tailieu.vn Xem trực tuyến Tải xuống
WPF 4.0 and Silverlight 3.0. The Properties window in VS2010 for XAML applications has a new view mode that prioritizes the properties that you have defined above all the others.. CHAPTER 15 WPF 4.0 AND SILVERLIGHT 3.0. In VS2010 you can now open the Properties window, click the Sort by property source button (the third one along),and you will find...
tailieu.vn Xem trực tuyến Tải xuống
Figure 15-6. Figure 15-7. Figure 15-8. Figure 15-9. Figure 15-10. Figure 15-11. Figure 15-13. Now press F5 to run your application and you will have a fully functional master details view similar to Figure 15-14.. Figure 15-14
tailieu.vn Xem trực tuyến Tải xuống
WPF 4.0 now contains the DataGrid, Calendar, and DatePicker controls that were previously available as part of the WPF toolkit. Figure 15-16 shows the new Calendar and DatePicker controls. Figure 15-17 shows the DataGrid control in action.. Figure 15-16. Figure 15-17. The easiest way to create these controls is to drag them from the toolbox or add them manually with...
tailieu.vn Xem trực tuyến Tải xuống
This should then allow you to write input binding XAML such as the following:. This is fixed in WPF 4.0 (possibly driven by the need for clear text in VS2010 IDE) and you now have much finer-grained control over how text is rendered with the new TextFormattingMode and TextRenderingMode properties.. The following code demonstrates setting text to use the Display...
tailieu.vn Xem trực tuyến Tải xuống
Before you look at the new changes in Silverlight 3.0, note that upgrading can potentially break existing applications. And this URL provides guidance on how to upgrade your Silverlight 2.0 applications:. Probably the best feature of Silverlight 3.0 is the ability it offers to run your applications offline. Press F5 to run your Silverlight project and then right-click the Silverlight...