ditec - e-commerce & asp.net
TRANSCRIPT
Diploma in Information Technology
Module X: E-Commerce & ASP.NET
Rasan SamarasingheESOFT Computer Studies (pvt) Ltd.No 68/1, Main Street, Pallegama, Embilipitiya.
Contents
1. What is a Business ?2. E-Business3. Application of E-Businesses4. What is E-Commerce ?5. E-Commerce Models6. Business to Business (B2B)7. Business to Consumer (B2C)8. Consumer to Business (C2B)9. Business to Employee (B2E)10. Consumer to Consumer (C2C)11. Shopping Carts12. Types of Web Pages13. Creating Dynamic Web Pages14. What is ASP.NET ?
15. What you can do with ASP.NET ?16. How ASP.NET Works ?17. Features of ASP.NET18. ASP.NET Web Forms19. Controls in Web Forms20. HTML Controls21. Server Controls22. HTML Server Controls23. Event Handlers24. The Page Load Event25. IsPostBack Property26. Navigation by using Response Class27. Passing Values from Page to Another28. Data Binding to a Drop Down List
What is a Business ?
An organization that provides products or services to customers who want or need them.
E-Business
Electronic business is application of information and communication technologies
to improve your business processes.
Application of E-BusinessesCustomer Relationship
Management (CRM)Enterprise Resource
Planning (ERP)Document Management
System (DMS)Human Resources
Management (HRM)
Internet shopSupply chain management
Online marketingOnline Transactions
VoIPContent
Management SystemE-mail
VoicemailWeb ConferencingDigital work flows
Internal business systems
Electronic Commerce
Enterprise communication and collaboration
What is E-Commerce ?
Electronic Commerce is the buying and selling products or services over electronic systems
such as the internet and other computer networks.
E-Commerce Models
• Business to Business (B2B)• Business to Consumer (B2C)• Consumer to Business (C2B)• Business to Employee (B2E)• Consumer to Consumer (C2C)
Business to Business (B2B)
Transacting between businesses, such as between a manufacturer and a wholesaler, or
between a wholesaler and a retailer.
Business to Consumer (B2C)
This is refers to when businesses selling their products or services to the customer.
Consumer to Business (C2B)
In C2B consumers can offer products and services to companies and the companies pay
them.
Business to Employee (B2E)
Application of an intra business network which allows companies to provide products or
services to their employees.
Consumer to Consumer (C2C)
Involves the transactions between consumers through some third party.
Shopping Carts
• A shopping cart is a piece of web application software.
• It acts as an online store's catalog and ordering process.
• It allowing consumers to select goods, review what they have selected, and purchase them.
Types of Web Pages
• Static Web Pages• Dynamic Web Pages
Types of Web Pages
Static web pages contain the same prebuilt content each time the page is loaded.
Dynamic web pages contain server side or client side code which allows the server to generate unique content each time the page is loaded.
Static Web Pages
Dynamic Web Pages
Creating Dynamic Web Pages
• Client Side Scripting• Server Side Scripting
Client Side Scripting
Client side scripting enables you to develop web pages that can dynamically respond to the user input without having an interact with web server.
Server Side Scripting
Server side scripting provides dynamic content to users based on the information stored in a remote location such as a back end database.
What is ASP.NET ?
ASP.NET is a server-side Web application framework designed for Web development to
produce dynamic Web pages.
What you can do with ASP.NET ?
ASP.NET was developed by Microsoft to allow programmers to build dynamic web sites, web
applications and web services.
How ASP.NET Works ?
1. When a browser requests an asp.net file, IIS passes the request to the ASP.NET Engine on the server.
2. Then asp.net engine read the file line by line and execute the scripts in the file.
3. Finally the ASP.NET file is returned to the browser as a plain HTML file.
.ASPX
CompiledCode
Request (http://www.website.com)
Response (website page)
IIS Server
Features of ASP.NET
Compiled CodeEnriched Tool SupportPower and FlexibilitySimplicityManageability, Scalability and Security
ASP.NET Web Forms
• Web Forms is an ASP.NET programming model, with event driven web pages written as a combination of HTML, server controls, and server code.
• Web Forms are compiled and executed on the server, which generates the HTML that displays the web pages.
• All server controls must appear within a <form> tag in the Web Form.
Controls in Web Forms
We use several type of controls in Web Forms
• HTML Controls• Server Controls• HTML Server Controls
HTML Controls
These are the basic HTML elements.
Some of them you know…
<p>this is a paragraph</p><a href=“http://google.com”>Google</a>
<img src=“images/Car.jpg” />
Server Controls
Server controls are tags that are understood by the server.
The syntax of a Web server control is:
<asp:control_name id="some_id" runat="server" />
Button, Label, Calendar, HyperLink, Etc.
HTML Server Controls
To make HTML elements programmable like a server control, add a runat="server" attribute
to the HTML element.
This attribute indicates that the element should be treated as a server control.
<img scr=“images/Car.jpg” id=“img1” runat=“server”/>
Event Handlers
An Event Handler is a subroutine that executes code for a given event.
Examples:When a Button clicksWhen an item selects from a ListBoxWhen a page loading
The Page Load Event
The page Load event is triggered every time when a page loads.
protected void Page_Load(object sender, EventArgs e) {
}
IsPostBack Property
Gets a value that indicates whether the page is being rendered for the first time or is being loaded in
response to a postback.
protected void Page_Load(object sender, EventArgs e) {
if (IsPostBack) {
Response.Write(“Hi"); }
}
Navigation by using Response Class
The redirect method on Response class use to redirect the user to another web page.
protected void btnGo_Click(object sender, EventArgs e) { Response.Redirect(“AboutUs.aspx”); }
Passing Values from Page to Another
Roshan|Name: Enter
Welcome Roshan
Welcome.aspx
Main.aspx
Passing Values from Page to Another
protected void btnEnter_Click(object sender, EventArgs e) { Response.Redirect(“Main.aspx?name=" + txtName.Text); }
protected void Page_Load(object sender, EventArgs e) { Response.Write("Welcome " + Request.QueryString["name"]); }
Welcome.aspx
Main.aspx
Passing Values from Page to Another
protected void btnEnter_Click(object sender, EventArgs e) { Session["name"] = txtName.Text; Response.Redirect(“Main.aspx"); }
protected void Page_Load(object sender, EventArgs e) { Response.Write("Welcome " + Session["name"].ToString()); }
Welcome.aspx
Main.aspx
Data Binding to a Drop Down List
SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS; Initial Catalog=studentdb; Integrated Security=true");
protected void Page_Load(object sender, EventArgs e){
con.Open();SqlDataAdapter da = new SqlDataAdapter(“SELECT * FROM tblStudent", con);DataSet ds = new DataSet();da.Fill(ds, "tblst");DropDownList1.DataSource = ds;DropDownList1.DataValueField = "ID";DropDownList1.DataTextField = "Name";DropDownList1.DataBind();con.Close();
}
The End
http://twitter.com/rasansmn