1 / 6

CIS 375—Web App Dev II

CIS 375—Web App Dev II. ASP .NET 3 Working With Server Controls. Declaring Server Controls. ASP.NET server controls are identified within a page using declarative _____ that contain a runat="server" attribute.

shanae
Download Presentation

CIS 375—Web App Dev II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 375—Web App Dev II ASP .NET 3 Working With Server Controls

  2. Declaring Server Controls • ASP.NET server controls are identified within a page using declarative _____ that contain a runat="server" attribute. • The following example declares three <asp:label runat="server"> server controls and customizes the text and style properties of each one individually. • VB Controls1.aspx [Run Sample] | [View Source]

  3. Manipulating Server Controls • You can identify an individual ASP.NET server control within a page by providing it with an ___ attribute. • You can use this id reference to manipulate the server control's _______ model at run time. • For example, the following sample demonstrates how a page developer could set an <asp:label runat="server"> control's Text property within the Page_Load event. • VB Controls2.aspx [Run Sample] | [View Source]

  4. Handling Control Action Events • ASP.NET server controls can optionally expose and _______ server events, which can be handled by page developers. • A page developer may accomplish this by declaratively _______ an event to a control where the attribute name of an event wireup indicates the event name and the attribute value indicates the name of a _________ to call. • For example, the following example demonstrates how to wire an OnClick event to a button control. • VB Controls3.aspx [Run Sample] | [View Source]

  5. Performing Page Navigation (Scenario 1) • Page navigation among multiple pages is a common scenario in virtually all Web applications. • The following sample demonstrates how to use the <asp:hyperlink runat=server> control to navigate to another page (passing custom query string ___________ along the way). • The sample then demonstrates how to easily get access to these query string parameters from the ________ page.

  6. Performing Page Navigation (Scenario 2) • Not all page navigation scenarios are initiated through hyperlinks on the ________. • Client-side page redirects can also be initiated from the server with Response.Redirect(url). • This is typically done when server-side ___________ is required on some client input before navigation. • The following demonstrates how to use Response.Redirect to pass parameters to another target page. It also demonstrates how to easily get access to these parameters from the target page. • VB Controls6.aspx [Run Sample] | [View Source]

More Related