Sharing Information Between Pages

Demonstration Using web.config Variables Using Session and Application Variables Demonstration Using Session Variables Saving Session and Application Variables in a Database Discussion Different Ways of Sharing Information It is often necessary to share information between the pages of a Web application. The information being shared can be either static or dynamic. In this section, you will learn how to share both static and dynamic data between pages of a Web application. Stores objects and...

Exercise 3 Optional Creating a Menu Page

In this exercise, you will create a menu for the Web site. The menu.aspx page reads categories of data from the database and displays them in a DataList Web control. 1. Create a new ASP.NET page named Menu.aspx in the ASPNET Web site. Note There is a Menu.aspx file in the folder that you can add to your project and edit. 2. Create a DataList control named lstMenu. < asp DataList id 1stMenu width 145 runat server> 3. Between the < asp DataList> and < asp DataList> tags, create an...

What Is New in ASPNET

Global Application File (Global.asax) Demonstration Using Event Procedures in Global.asax In addition to all of the features provided by ASP, ASP.NET provides several new features designed to enhance the functionality of an application. This section focuses on the new features in ASP.NET. Each Active Session Is Identified and Tracked Using Session IDs SessionIDs Are Communicated Across Client-Server Requests Using an HTTP Cookie or Included in the URL Default mechanism for storing SessionIDs...

Creating and Calling a Web Service by Using Visual Studio NET

Visual Studio .NET makes creating and calling Web services easy. In Visual Studio .NET, you can easily expose any function, in any language, as a Web service. You do not need to learn XML and SOAP to take advantage of Web services. When you compile your business objects, Visual Studio .NET automatically generates an XML file that describes the function and, when it is called, the function will automatically send and receive XML packets. After you build the Web service, both the compiled code...

Msdn training msdn

Part Number X08-50211 Released 09 2001 Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, places or events is intended or should be inferred. Complying...

Using a User Control in an Aspnet Page

Include User Controls in Another ASP.NET Page Using the Register Directive lt Register TagPrefix conference TagName validNum Src numberBox.ascx gt Insert the User Control Like a Server Control lt conference validNum id num1 runat server gt Set Properties of the User Control User controls are included in an ASP.NET page by using the Register directive lt Register TagPrefix conference TagName validnum Src numberbox.ascx gt The TagPrefix attribute determines a unique namespace for the user...

Setting Trace Attributes

The trace section of the configuration file also supports an attribute for controlling whether trace statements are output to the client browser or are available only from trace.axd. The attributes supported in the trace configuration section are listed in the following table. Set to True or False. Indicates whether tracing is enabled for the application or not. Default is True. Indicates whether trace information should be rendered at the end of each page, or accessible only through the...

What Is a Web Service

Web services provide a simple, flexible, standards-based model for binding applications together over the Internet and taking advantage of the existing infrastructure and applications. In this section, you will learn about the need for Web services and about their architecture. You will also learn about existing Web services and how to find them. One of today's most pressing challenges for developers is application integration. Application integration is the process of taking a group of...

Using Code Behind Procedures

To call a function or sub-procedure in a code-behind page, preface the name of the procedure with the name of the code-behind page. For example, in the class myDemo, in the code-behind page demo.vb, a function named getData returns a DataSet object. The following sample code calls the getData function and then displays the returned DataSet ds in the DataGrid control dgAuthors . Pub1ic Sub Page_Load Src As Object, E As EventArgs Dim ds As DataSet ds getData dgAuthors.DataSource ds...

Advantages of Partitioning an Aspnet Page

Partitioning ASP.NET pages into code and content has several advantages. Partitioning eliminates confusing pages where code and HTML are intertwined, producing pages that are easier to maintain and understand. In addition Members of the development team can work on their own parts without disturbing the work of others. For example, the interface designer can work on the interface files at the same time that the programmer works on the source code files. Partitioning code and content allows...

Creating a Parameter

To create a parameter for the SqlDataAdapter object, create a new SqlParameter object with the name and data type of the parameter. Next, set the Direction property of the new parameter to indicate how the parameter is used by the stored procedure. If the stored procedure returns a return value, create a parameter named returnValue. If the parameter is an input parameter, set the Value property to specify the data that should be sent to the server. For example, the ProductsByCategory stored...

Calling a Web Service by Using a Proxy

Another method for calling a Web service is by using a proxy. In this section you will learn how to call a Web service by using a proxy. Note You will first learn how to create a Web service manually, and then learn how to create it by using Microsoft Visual Studio .NET. Compiling an .asmx File into a Proxy A proxy class is code that looks exactly like the class it is meant to represent, but does not contain any of the application logic. Instead, it contains marshaling and transport logic. The...