tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 16

Professional in C# and Visual Basic Part 16. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 2 Server Controls and Client-Side Scripts using using using public partial class Default2 private string _callbackResult null protected void Page_Load object sender EventArgs e string cbReference this arg GetCustDetailsFromServer context string cbScript function UseCallback arg context cbReference UseCallback cbScript true region ICallbackEventHandler Members public string GetCallbackResult return _callbackResult public void RaiseCallbackEvent string eventArgument SqlConnection conn new SqlConnection Data Source . Initial Catalog Northwind User ID sa SqlCommand cmd new SqlCommand Select From Customers Where CustomerlD eventArgument conn SqlDataReader MyReader MyReader string MyValues new string 11 while MyValues 0 MyReader CustomerID .ToString MyValues 1 MyReader CompanyName .ToString MyValues 2 MyReader ContactName .ToString MyValues 3 MyReader ContactTitle .ToString MyValues 4 MyReader Address .ToString MyValues 5 MyReader City .ToString MyValues 6 MyReader Region .ToString MyValues 7 MyReader PostalCode .ToString MyValues 8 MyReader Country .ToString MyValues 9 MyReader Phone .ToString 103 Chapter 2 Server Controls and Client-Side Scripts MyValues 10 MyReader Fax .ToString _callbackResult MyValues endregion Much of this document is quite similar to the document in the previous example using the callback feature. The big difference comes in the RaiseCallbackEvent method. This method first performs a select statement on the Customers database based upon the CustomeriD passed in via the eventArgument variable. The result retrieved from this select statement is then made part of a string array which is finally concatenated

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.