ASP Web Server Controls Please use speaker notes for additional information!

Slides:



Advertisements
Similar presentations
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
A spreadsheet is like a big table. It contains rows and columns which work together. Left-click to go to the next slide.
Html: getting started HTML is hyper text markup language. It is what web browsers look at on the Internet. HTML documents should be created in a simple.
More frames in XHTML Please use speaker notes for additional information!
LEVEL 3 Lesson #25: Pet 10 – 12 Minute. Lesson #25: Pet.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Visual Basic for Applications Class III. User Forms  We place controls on User Forms to get input from the user.  Common controls include text boxes,
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Two dimensional arrays Please use speaker notes for additional information!
Prepositions.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Creating your Webpage with tables. This is a 2 column by 1 row table!
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… HTML Lists, Tables and Forms v2.0.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Using VNU. Getting Started Download and install KompoZer or NVU from the PortableApps web site onto your personal computer.PortableApps Versions for both.
ASP.NET Web Server Controls Basic Web Server Controls.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
For Loops (ProjFor1, ProjFor2, ProjFor3, ProjFor4, textbox, textbox1) Please use speaker notes for additional information!
Array - adding to array at run time Please see speaker notes for additional information!
Prepositions Mini-Lesson
Intro to More Controls in C#. C# Demonstration We already touched on labels and buttons Ad-hoc demo of controls – Textboxes Multiline – Checkbox – Radiobutton.
1 Chapter 12 – Web Applications 12.1 Programming for the Web, Part I 12.2 Programming for the Web, Part II 12.3 Using Databases in Web Programs.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
MDI with Menu Please use speaker notes for additional information!
Button and Textbox. Input  Input objects are used to obtain input from the user viewing the webpage. They allow the user to interact with the Web. 
Class 3 Remote Instruction Computer Math EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
1 Advanced Computer Programming Lab Calculator Project.
You should unzip and download the beginning programs.
Pay Example (PFirst98) Please use speaker notes for additional information!
Visual Basic I/O Programs (ProjRead1, ProjRead2, ProjWrite1, ProjPay) Please use speaker notes for additional information!
1 Chapter 10 – Database Management 10.1 An Introduction to Databases 10.2 Editing and Designing Databases.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
31/01/ Selection If selection construct.
Using ADO.Net to Build a Login System Dr. Ron Eaglin.
CIS 375—Web App Dev II ASP.NET 5 Events. 2 The Page_Load Event The Page_Load event is triggered when a page loads. [Example]Example Sub Page_Load lbl1.Text="The.
Lecture Set 7 Procedures and Event Handlers Part B - The Structure of an Application Event Handlers.
Graphical User Interface Components Version 1.1. Obectives Students should understand how to use these basic Form components to create a Graphical User.
How do you make a data table?. In this lesson you will learn how to organize data by making a table.
Using a Database Access97 Please use speaker notes for additional information!
CSD 340 (Blum)1 Introducing Text Input elements and Ifs.
I am using Visual Basic 6 for this class. If you want to use a different version, please contact me. Thanks!
Presented by Cheryl Sullivan.  Name  Department  What do you want out of the training?  Favorite food.
Using Forms and Form Elements In Visual Basic.NET.
1 R3 R1 R5 R4 R6 R2 B B A A Looking at the Code Under the View menu Select Source.
CSCI 6962: Server-side Desig n and Programming ASP Server Controls.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Visual Basic Fundamental Concepts
This shows the user interface and the SQL Select for a situation with two criteria in an AND relationship.
Animal Random Slide Show Menu
Unit 27 - Web Server Scripting
Visual Basic..
Department Array in Visual Basic
CIS16 Application Development and Programming using Visual Basic.net
Report using ADO connection
Remember that the order of operations does multiplication before addition, but the order was changed by using the parenthesis to force the addition first.
Adding Record To Your Database
If statements (Inven1, Inven2, Inven2a, Inven3, Inven3a)
Training & Development
Searching Your Database
MIS 3200 – Unit 5.1 Iteration (looping) Working with List Items
Presentation transcript:

ASP Web Server Controls Please use speaker notes for additional information!

Label Web Server Control ASP.NET Label Web Server Control Label Web Server Control Label Web Server Control ASP.NET Label Web Server Control Simple example of a label control! My code. Output Results of viewing source.

Label Web Server Control Testing the Label Web Server Control Sub Page_Load lblHeader.Text="Testing the Label Web Server Control" lblDate.Text="Today is: " & now() End Sub ASP.NET

Testing the Label Web Server Control ASP.NET Testing the Label Web Server Control Today is: 6/24/2003 4:56:55 PM Testing the Label Web Server Control Sub Page_Load lblHeader.Text="Testing the Label Web Server Control" lblDate.Text="Today is: " & now() End Sub ASP.NET My code is shown here. The output is shown here. When you click on view source, you see the code below.

Testing the Label Web Server Control Sub Page_Load(sender As Object, e As EventArgs) lblHeader.Text="Testing the Label Web Server Control" lblDate.Text="Today is: " & now() End Sub ASP.NET Label Web Server Control

Textbox Web Server Control Sub NameSub(sender As Object, e As EventArgs) lblGreet.text = "Hi, " & txtFst.text & " " & txtLast.text End Sub ASP.NET Textbox Web Server Control First Name Last Name Button & Textbox Web Server Controls

Textbox Web Server Control ASP.NET Textbox Web Server Control First Name Last Name Hi, Susan Ash

List before I checked anything. List after I checked the three components of my sentence.

Here I unclicked the horse and you can see the sentence is simply jumped over the fence. Now I clicked The dog and the sentence got reformed starting with the first clicked element and moving sequentially through the last clicked item.

Make sentences using List Items Sub makeSentence(sender As Object, e As EventArgs) dim ct mySentence.Text=" Your sentence: " for ct =0 to phrases.Items.Count-1 if phrases.Items(ct).Selected then mySentence.Text=mySentence.Text & " " & phrases.Items(ct).Text end if next End Sub Sub clear(Source As Object, e As EventArgs) dim pt for pt = 0 to phrases.Items.Count-1 if phrases.Items(pt).Selected then phrases.Items(pt).Selected = False end if next mySentence.Text="" End Sub Each time this is executed, it checks all of the check boxes and concatenates each box that is checked to the mySentence structure. This code clears by checking to see if the item is checked and if it is setting it to false. Obviously, I did not need to do the check, I could have just set them all to false. Clears the sentence which is made up of the phrase Your sentence in a paragraph followed by the selected elements formed into the mySentence structure. The mySentence structure is a paragraph that says Your sentence: followed by the sentence I put together.

<asp:CheckBoxList id="phrases" AutoPostBack="True" TextAlign="Right" OnSelectedIndexChanged="makeSentence" runat="server"> The dog The cat The bird The fish The horse ran flew swam jumped trotted over the fence onto the railing into the rock down the hill into the tree into the cage up the stream <asp:Button id="clearButton" Text="Clear" runat="server" OnClick="clear"/> The event OnSelectedIndexChanged causes makeSentence to be executed. This code sets up the elements in the list. The label holds the sentence that was constructed. A clear button is set up. The on click event causes the clearButton sub to be executed.

Your sentence: The horse jumped over the fence <input id="phrases_0" type="checkbox" name="phrases:0" onclick="__doPostBack('phrases:0','')" language="javascript" /> The dog Make sentences using List Items <!-- function __doPostBack(eventTarget, eventArgument) { var theform = document._ctl0; theform.__EVENTTARGET.value = eventTarget; theform.__EVENTARGUMENT.value = eventArgument; theform.submit(); } // -->

<asp:CheckBoxList id="phrases" AutoPostBack="True" TextAlign="Right" OnSelectedIndexChanged="makeSentence" RepeatColumns=3 RepeatDirection=Vertical runat="server"> The dog The cat The bird The fish The horse The duck The elephant ran flew swam jumped trotted lumbered walked over the fence onto the railing into the rock down the hill into the tree into the cage up the stream <asp:Button id="clearButton" Text="Clear" runat="server" OnClick="clear"/> Changed code to get 3 vertical columns. Added elements to the list of items.

Make sentences using List Items <asp:Table runat="server" id="flyPrice" BorderWidth=3 CellPadding=5 CellSpacing=5 GridLines="both" HorizontalAlign="Left"> Fare Table From Boston From NY From DC To London To San Francisco Table Web Server Control Continued on next slide...

To Baku To Oslo

Table Sub getFare(sender As Object, e As EventArgs) dim strFare as string dim intFromIndx as integer dim intToIndx as integer dim objRow as TableRow dim objCell as TableCell intFromIndx = fromCity.SelectedIndex intToIndx = toCity.SelectedIndex objRow = flyPrice.Rows.Item(intToIndx+1) objCell = objRow.Cells.Item(intFromIndx+1) strFare = objCell.Text yourFare.Text="Your fare is: " & strFare End Sub From Boston From NY From DC To London To San Francisco To Baku To Oslo <asp:Table runat="server" id="flyPrice" BorderWidth=3 CellPadding=5 CellSpacing=5 fromCity.Selected Index means to tell which one was selected (0, 1, 2). This works the same with toCity.Selected Index, but there is one more entry. Now I am going to the table with multiple rows (shown on next slide) and use intToIndx +1 because in this table I made the first row a header. After getting the Row, I then get the cell. I then store the text from the objCell as the strFare. Here is where I develop the contents of yourFare which is the id of the label displayed in the next screen.

GridLines="both" HorizontalAlign="Left"> Fare Table From Boston From NY From DC To London To San Francisco To Baku To Oslo This shows the setup of the table and cells and the data contained. You can see the headers and the data. I know use label to show the id of yourFare which was generated in the OnClick execution of getFare.

Table From Boston From NY From DC To London To San Francisco To Baku To Oslo Fare Table From Boston From NY From DC To London To San Francisco To Baku To Oslo Your fare is: 245