CS 3870/CS 5870 Test 2 (50 points) Thursday 2 - 4.

Slides:



Advertisements
Similar presentations
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
Advertisements

1 CS 3870/CS 5870: Lab4 Save with Invalid Price Keep Order After Updating.
11 ASP.NET Controls II Beginning ASP.NET 4.0 in C# 2010 Chapter 6.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
ASP.NET and ADO.NET. ASP.NET Server Controls Intrinsic Controls: These controls correspond to their HTML counterparts. –Ex. Textbox, listbox, button,
Working with Session and Application Objects. Postback and Variables Variables declared in a web page including ADO.Net objects may be reinitialized and.
ASP.NET and ADO.NET. Bind the DataReader to a DataGrid Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = c:\sales2k.mdb" Dim objConn.
Working with Session. Postback and Variables Variables declared in a web page including ADO.Net objects may be reinitialized and lose their values.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
Tutorial 11 Using and Writing Visual Basic for Applications Code
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
Navigating database with windows forms.. Tiered applications  Provide a means to develop many presentations of the same app  Makes changes to the back.
INSPIRING CREATIVE AND INNOVATIVE MINDS Module 4: Adding Code to a Microsoft ASP.NET Web Form Implementing Code-Behind Pages Adding Event Procedures to.
Web Server Controls MacDonald Ch. 5 MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
ASP.NET Web Server Controls Basic Web Server Controls.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
Mark Dixon 1 22 – Web applications: Writing data to Databases using ASP.Net.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
1 CS 3870/CS 5870: Note 11 Authentication and Authorization Membership Provider.
Unit 8.3 Learning Objectives Insert users into the ASP.NET Membership system from code Capture data being sent to the database Capture Exceptions that.
Working with GridView Control: Adding Columns. Adding Buttons to a Bound GridView: 1. Drag the WebProduct table from Data connection to a page 2. Demo.
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 3: Adding Code to a Microsoft ASP.NET Web Form.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
 Page_Init  Page_Load  cmdINew_Click  cmdISave_Click  cmdIDelete_Click  cmdISubmit_Click  cmdIClear_Click  gridLineItem_RowEditing  gridLineItem_RowDeleting.
ASP.NET More on searching databases 1ASP.NET, More on searching databases.
1 CS 3870/CS 5870: Note05 Prog3 Web Application with Database.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
Reference: “ASP.NET 2.0 Illustrated” by Alex Homer and Dave Sussman. -ch3 illustrated book
1 CS 3870/CS 5870: Note 19 SiteMap and AJAX Lab 8.
ASP.NET Binding and an Introduction to Database Queries Please use speaker notes for additional information!
1 CS 3870/CS 5870: Note 20 Web Service. 2 What is Web Service? Providing functionality online to other applications, Web and Windows applications. The.
Christopher M. Pascucci.NET Programming: WebForm Events.
1 CS387/CS587: Note 08 Shopping Bag DataTable. 2 DataClass Public Shared Function NewShoppingBag() As Data.DataTable Dim bag As New Data.DataTable bag.Columns.Add("Product.
1 CS 3870/CS 5870: Note 18 SiteMap Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab
1 CS387/CS587: Note05 Lab 3. 2 Global.asax Must not be under any sub-folder Application_Start Application_End Application_Error Session_Start Session_End.
1 CS 3870/CS 5870: Note 12 Authentication and Authorization Membership Provider.
1 CS 3870/CS 5870: Note 16 Web User Controls. Prog 7 Copy Prog6 to Prog7 Modify all files for Prog7 Remove Web.config from sub-folders Make sure Prog7.
1 CS387/CS587: Note04 Lab 3. 2 Master Page All Web pages will be similar Should be created before other web pages Add New Items Controls on the Master.
CIS 375—Web App Dev II ASP.NET 4 Server Controls.
1 CS 3870/CS 5870: Note 13 Web Service. 2 What is Web Service? Providing functionality online to other Web applications SOAP Simple Object Access Protocol.
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.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
ADO.NET Objects Data Adapters Dr. Ron Eaglin. Agenda Builds on Information in Part I Should have working knowledge of creating a database connection Continuation.
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
Beginning ASP.NET in C# and VB Chapter 9
1. Prog3 Try and Catch Testing 2 Catching Database Errors Protected Sub DetailsView1_ItemDeleted( sender As Object, e As DetailsViewDeletedEventArgs)
Computing with C# and the .NET Framework
Web Application with Database
CS 3870/CS 5870 Web User Controls.
Session Variables and Post Back
Listing 9.1 ShowLocalConnection.aspx
Web Application with Dataase
ASP.NET and ADO.NET.
test slide
CS 3870 Prog6 Roles Management Due Monday, November 5 Group Assignment.
CS 3870/CS 5870 Web User Controls Events (II).
CIS16 Application Development and Programming using Visual Basic.net
Using List Controls with SQL Server
Adding Record To Your Database
Web Application with Dataase
Chapter 10 Accessing Database Files
ASP.NET and ADO.NET.
CHAPTER FOUR VARIABLES AND CONSTANTS
Presentation transcript:

CS 3870/CS 5870 Test 2 (50 points) Thursday 2 - 4

Accessing Database Code class DataSource Control Your choice on the test

Data Binding GridView DetailsView Textbox DropDownList . . .

DetailsView AllowPage For end user For developer

Accessing Individual Elements of DetailsView c.TheID = DetailsView1.Rows(0).Cells(1).Text c.TheName = DetailsView1.Rows(1).Cells(1).Text

DropDownList One field of all records DataTextField DataValueField: PK column

DetailsView and DropDownList Using DropDownList to select records of DetailsView

Protected Sub DropDownList1_SelectedIndexChanged (sender As Object, e As EventArgs) Handles DropDownList1.SelectedIndexChanged DetailsView1.PageIndex = DropDownList1.SelectedIndex End Sub

PostBack Default True for Buttons Default False for many other controls

Session Variables

Global.asax Session("Prog7_Bag") = New SortedList

Accessing Session Variables Protected Sub Page_Load(. . .) Handles Me.Load Dim bag As SortedList = Session("Prog7_Bag") . . . End Sub

Web User Control A class Can have other controls Properties Methods Events

Using Web User Control <%@ Register Src="~/Prog7/ShoppingItem.ascx" TagPrefix="uc1" TagName="ShoppingItem" %>

Placing User Controls on Forms At design time At run time

Adding to Forms at Run Time Protected Sub Page_Load(. . .) Handles Me.Load ‘ Need to find the form to add the control Dim theForm As Control = Master.Master.FindControl("form1") . . . theForm.Controls.Add(c1) End Sub

Adding to Placeholder at Run Time Protected Sub Page_Load(. . .) Handles Me.Load c1 = CType(LoadControl("../ShoppingItem.ascx"), Prog7_ShoppingItem) . . . PlaceHolder1.Controls.Add(c1) End Sub

Adding to Panels at Run Time Protected Sub Page_Load(. . .) Handles Me.Load c1 = CType(LoadControl("../ShoppingItem.ascx"), Prog7_ShoppingItem) . . . Panel1.Controls.Add(c1) End Sub

Web User Control as a Class Protected Sub btnBag_Click(. . .) Handles btnBag.Click c1 = New Prog7_ShoppingItem End Sub

Web User Control NOT as a Class Protected Sub Page_Load(. . .) Handles Me.Load ‘ New does not work c1 = CType(LoadControl("../ShoppingItem.ascx"), Prog7_ShoppingItem) theForm.Controls.Add(c1) End Sub

Public Event Define event Raise event Handle event

Test 2 (50 points) Thursday 2 - 4