Chapter 7 Quick Reference


Chapter 7 Quick Reference

To

Do this

Modify the runtime behavior of an ASP.NET Web Form

Add the @ Page directive to the page and set the desired attributes.

Use classes by name without explicitly specifying their namespace

In a Web Form, add the @ Import directive, with the namespace attribute specifying the namespace to import.

In a Visual Basic .NET code-behind file, add the Imports statement with the desired namespace.

Make a user control or custom server control available for use on a Web Form

Drag and drop the user control from the Solution Explorer window onto the design surface of a Web Form.

Enable output caching

Add the @ OutputCache directive to the page, and set the desired attributes.

Create a user control

Right-click the project in Solution Explorer, select Add, and then select Add Web User Control. Add the desired controls to the user control, and write any code necessary, and then save the files and build the project.

Write server-side functions in a Web Forms page

Create a <script> block with the runat=“server” attribute and place the functions within it.

Handle page-level events

Add an event handler with the appropriate signature (such as Page_eventname) to the code-behind module for the page (or the server <script> block for pages that do not use code-behind).




Microsoft ASP. NET Programming with Microsoft Visual Basic. NET Version 2003 Step by Step
Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Version 2003 Step By Step
ISBN: 0735619344
EAN: 2147483647
Year: 2005
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net