1 / 32

Web Programming

Web Programming. Building ASP.NET Applications. T. Ahlam Algharasi 4 th Level. Standard Controls. Label Control The Label control is one of the primary output controls.

Download Presentation

Web Programming

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. Web Programming Building ASP.NET Applications T. AhlamAlgharasi 4th Level

  2. Standard Controls • Label Control • The Label control is one of the primary output controls. • It defines an area on the Web page to which output can be written. This control can be used to display static text, or it can be used as a dynamic output area controlled by scripts.

  3. Standard Controls • Displaying Static Text • Example

  4. Standard Controls • Using html Tags to format the output text .

  5. Standard Controls

  6. Standard Controls • Image Control • Is used to place an image on the page.

  7. Standard Controls • Hyperlink Control • Is used to link to another location or page.

  8. Standard Controls • If both Text and ImageUrl properties are set, the ImageUrl property takes precedence and the Text property serves as a Tool Tip. If the image is unavailable, the Text property is displayed.

  9. Standard Controls • Button Control • Is used to link to another location or page. • LinkButton Control • displays a clickable text link • ImageButton Control • displays an image that responds to mouse clicks like a button.

  10. Standard Controls • RadioButton control • Is used to give single select option to the user from multiple items.

  11. Standard Controls • Example

  12. Standard Controls • Example of Automatic Post-Back

  13. Standard Controls • RadioButtonList control • is a single control that groups a collection of radio buttons.

  14. Standard Controls • Example

  15. Standard Controls • CheckBox control • is used to give an option to the user.

  16. Standard Controls • CheckBoxList control • is a single control that groups a collection of checkable list items.

  17. Standard Controls • DropDownList control • is used to give a single select option to the user from multiple listed items. • ListBox control • ListBox control is used to give a single or multiple select option to the user.

  18. Standard Controls • Example

  19. Standard Controls • ImageMap control • is used to create an image that contains clickable hotspot region.

  20. Standard Controls • Creating an Image Map • An image map can be created from any graphic image by defining rectangular, circular, or polygonal shapes overlying portions of the image. These shapes become the clickable hot spots to issue URL navigations or subprogram calls. • The information needed to define these shapes are • Rectangle - the pixel coordinates of the top-left and bottom-right corners • Circle - the pixel coordinates of the center and its radius • Polygon - the pixel coordinates of each corner point

  21. Standard Controls • Image Map Coordinates

  22. Standard Controls • Image Map Coordinates • Rectangle - left-top : 49,36; right-bottom : 216,148 • Circle - center:368,200; radius:76 • Polygon - corner points: 143,187 237,249 222,333 107,333 76,254

  23. ASP.NET Web Forms • All server controls must appear within a <form> tag, and the <form> tag must contain the runat="server" attribute. • The form is always submitted to the page itself. • If you omit the method attribute, it will be set to method="post" by default. <form runat="server">...HTML + server controls</form>

  24. ASP.NET Web Forms • Request Object • The Request object can be used to retrieve user information from forms. • User input can be retrieved with the Request.QueryString or Request.Form command. • Request.QueryString • The Request.QueryString command is used to collect values in a form with method="get". • Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.

  25. ASP.NET Web Forms • Request.Form • The Request.Form command is used to collect values in a form with method="post". • Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send. • Syntax: • Request.Form (Control_ID) • Request.QueryString(Control_ID)

  26. ASP.NET Web Forms • Example of sending information using “Post” Method • First Page • Second Page

  27. ASP.NET Web Forms • Code • First Page Default method is post

  28. ASP.NET Web Forms • Code • Second Page

  29. ASP.NET Web Forms • Example of sending information using “Get” Method • First Page • Second Page

  30. ASP.NET Web Forms • Code • First Page Method is Get

  31. ASP.NET Web Forms • Code • Second Page

  32. Questions

More Related