SlideShare a Scribd company logo
1 of 5
Download to read offline
CODE:
MASTER PAGE:
Partial Class MasterPage
Inherits System.Web.UI.MasterPage
Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Response.Redirect("DETAILS.aspx")
End Sub
End Class
REGISTRATION PAGE:
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class Registrtion
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Button1.Click
Try
Dim conn = New SqlConnection
conn.ConnectionString = "Data
source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio
2010WebSitesonlineshopApp_DataReg.mdf;Integrated Security=True;User Instance=True"
conn.Open()
Dim qry As String
qry = "INSERT INTO REGTAB (UNAME,EMAIL,PWD,ADDRESS) VALUES
(@unam,@mail,@pw,@add)"
Dim cmd As New SqlCommand(qry, conn)
cmd.Parameters.AddWithValue("@unam", TextBox1.Text)
cmd.Parameters.AddWithValue("@mail", TextBox2.Text)
cmd.Parameters.AddWithValue("@pw", TextBox3.Text)
cmd.Parameters.AddWithValue("@add", TextBox4.Text)
cmd.ExecuteNonQuery()
Response.Write("REGISTRATION SUCCESSFUL")
Response.Redirect("Home.aspx")
conn.Close()
Catch ex As Exception
Response.Write(ex.ToString)
End Try
End Sub
End Class
LOGIN PAGE:
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class Home
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Button1.Click
Try
Dim conn = New SqlConnection
conn.ConnectionString = "Data
source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio
2010WebSitesonlineshopApp_DataReg.mdf;Integrated Security=True;User Instance=True"
conn.Open()
Dim checkusr As String
checkusr = "SELECT count(*) FROM REGTAB WHERE UNAME=@uname AND PWD=@pwd"
Dim cmd As New SqlCommand(checkusr, conn)
cmd.Parameters.AddWithValue("@uname", TextBox1.Text)
cmd.Parameters.AddWithValue("@pwd", TextBox2.Text)
Dim cu As Integer
cu = Convert.ToInt32(cmd.ExecuteScalar)
If cu = 1 Then
Response.Redirect("product.aspx")
Else
Response.Write("USER NAME INCORRECT RETRY")
End If
cmd.ExecuteNonQuery()
conn.Close()
Catch ex As Exception
Response.Write(ex.ToString)
End Try
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Button2.Click
Response.Redirect("Registrtion.aspx")
End Sub
End Class
PRODUCT PAGE:
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class Product
Inherits System.Web.UI.Page
Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click, ImageButton3.Click,
ImageButton4.Click, ImageButton5.Click, ImageButton6.Click, ImageButton7.Click,
ImageButton8.Click, ImageButton9.Click, ImageButton10.Click, ImageButton11.Click,
ImageButton12.Click, ImageButton13.Click
Try
Dim conn = New SqlConnection
conn.ConnectionString = "Data
source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio
2010WebSitesonlineshopApp_DataCART.mdf;Integrated Security=True;User Instance=True"
conn.Open()
Dim qry As String
qry = "INSERT INTO CARTTAB (PRODUCTNAME,PRICE) VALUES (@PRODU,@PRICE)"
Dim cmd As New SqlCommand(qry, conn)
cmd.Parameters.AddWithValue("@PRODU", Label2.Text)
cmd.Parameters.AddWithValue("@PRICE", Label3.Text)
cmd.ExecuteNonQuery()
Response.Write("PRODUCT SUCCESSFULLY ADDED TO CART")
conn.Close()
Catch ex As Exception
Response.Write(ex.ToString)
End Try
End Sub
End Class
OUTPUT:
REGISTRATION PAGE:
LOGIN PAGE:
PRODUCT PAGE:
CART PAGE:
CONTACT PAGE:

More Related Content

What's hot

Creating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with ReactCreating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with Reactpeychevi
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginDavid Douglas
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asppriya Nithya
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase AuthPeter Friese
 
Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Ryan Dawson
 
AppSync.org: open-source patterns and code for data synchronization in mobile...
AppSync.org: open-source patterns and code for data synchronization in mobile...AppSync.org: open-source patterns and code for data synchronization in mobile...
AppSync.org: open-source patterns and code for data synchronization in mobile...Niko Nelissen
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversUtkarsh Mankad
 
The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?Tomomi Imura
 
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile AppsMongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile AppsMongoDB
 

What's hot (19)

Creating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with ReactCreating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with React
 
GreenRobot-Eventbus
GreenRobot-EventbusGreenRobot-Eventbus
GreenRobot-Eventbus
 
jQuery Behaviours
jQuery BehavioursjQuery Behaviours
jQuery Behaviours
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth
 
Windows 1809 Timeline
Windows 1809 TimelineWindows 1809 Timeline
Windows 1809 Timeline
 
Events - Part 2
Events - Part 2Events - Part 2
Events - Part 2
 
Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Whirlwind tour of activiti 7
Whirlwind tour of activiti 7
 
Bobcat Exchange Program
Bobcat Exchange ProgramBobcat Exchange Program
Bobcat Exchange Program
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
 
Android ax app wcf
Android ax app wcfAndroid ax app wcf
Android ax app wcf
 
Android+ax+app+wcf
Android+ax+app+wcfAndroid+ax+app+wcf
Android+ax+app+wcf
 
AppSync.org: open-source patterns and code for data synchronization in mobile...
AppSync.org: open-source patterns and code for data synchronization in mobile...AppSync.org: open-source patterns and code for data synchronization in mobile...
AppSync.org: open-source patterns and code for data synchronization in mobile...
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Web programming
Web programmingWeb programming
Web programming
 
The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?
 
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile AppsMongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local London 2019: Realm: The Secret Sauce for Better Mobile Apps
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
 

Similar to DOT NET LAB PROGRAM PERIYAR UNIVERSITY

DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
Vb database connections
Vb database connectionsVb database connections
Vb database connectionsTharsikan
 
Flex Building User Interface Components
Flex Building User Interface ComponentsFlex Building User Interface Components
Flex Building User Interface ComponentsAhmad Hamid
 
Introj Query Pt2
Introj Query Pt2Introj Query Pt2
Introj Query Pt2kshyju
 
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...QAFest
 
Dot net technology
Dot net technologyDot net technology
Dot net technologyMilanMiyani1
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionRaman Gowda Hullur
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its featuresAbhishek Sur
 
Ejercicio sql server vs visual .net
Ejercicio sql server vs visual .netEjercicio sql server vs visual .net
Ejercicio sql server vs visual .netAyuda Universidad
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state managementpriya Nithya
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your appVitali Pekelis
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVMAbhishek Sur
 
in order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfin order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfkalerottnerheissst52
 

Similar to DOT NET LAB PROGRAM PERIYAR UNIVERSITY (20)

DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Vb database connections
Vb database connectionsVb database connections
Vb database connections
 
Flex Building User Interface Components
Flex Building User Interface ComponentsFlex Building User Interface Components
Flex Building User Interface Components
 
Introj Query Pt2
Introj Query Pt2Introj Query Pt2
Introj Query Pt2
 
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
 
Geb qa fest2017
Geb qa fest2017Geb qa fest2017
Geb qa fest2017
 
Dot net technology
Dot net technologyDot net technology
Dot net technology
 
Lec 5
Lec 5Lec 5
Lec 5
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its features
 
Ejercicio sql server vs visual .net
Ejercicio sql server vs visual .netEjercicio sql server vs visual .net
Ejercicio sql server vs visual .net
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Session 5#
Session 5#Session 5#
Session 5#
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your app
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Ppt lesson 03
Ppt lesson 03Ppt lesson 03
Ppt lesson 03
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVM
 
in order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfin order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdf
 
2310 b 05
2310 b 052310 b 05
2310 b 05
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 

More from GOKUL SREE

UG_CS_DEPT_PRESENTATION.pptx
UG_CS_DEPT_PRESENTATION.pptxUG_CS_DEPT_PRESENTATION.pptx
UG_CS_DEPT_PRESENTATION.pptxGOKUL SREE
 
college quiz-1.pptx
college quiz-1.pptxcollege quiz-1.pptx
college quiz-1.pptxGOKUL SREE
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYDOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYGOKUL SREE
 

More from GOKUL SREE (12)

UG_CS_DEPT_PRESENTATION.pptx
UG_CS_DEPT_PRESENTATION.pptxUG_CS_DEPT_PRESENTATION.pptx
UG_CS_DEPT_PRESENTATION.pptx
 
college quiz-1.pptx
college quiz-1.pptxcollege quiz-1.pptx
college quiz-1.pptx
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYDOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

DOT NET LAB PROGRAM PERIYAR UNIVERSITY

  • 1. CODE: MASTER PAGE: Partial Class MasterPage Inherits System.Web.UI.MasterPage Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click Response.Redirect("DETAILS.aspx") End Sub End Class REGISTRATION PAGE: Imports System.Data.SqlClient Imports System.Configuration Partial Class Registrtion Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim conn = New SqlConnection conn.ConnectionString = "Data source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio 2010WebSitesonlineshopApp_DataReg.mdf;Integrated Security=True;User Instance=True" conn.Open() Dim qry As String qry = "INSERT INTO REGTAB (UNAME,EMAIL,PWD,ADDRESS) VALUES (@unam,@mail,@pw,@add)" Dim cmd As New SqlCommand(qry, conn) cmd.Parameters.AddWithValue("@unam", TextBox1.Text) cmd.Parameters.AddWithValue("@mail", TextBox2.Text) cmd.Parameters.AddWithValue("@pw", TextBox3.Text) cmd.Parameters.AddWithValue("@add", TextBox4.Text) cmd.ExecuteNonQuery() Response.Write("REGISTRATION SUCCESSFUL") Response.Redirect("Home.aspx") conn.Close() Catch ex As Exception Response.Write(ex.ToString) End Try End Sub End Class LOGIN PAGE: Imports System.Data.SqlClient Imports System.Configuration Partial Class Home Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim conn = New SqlConnection conn.ConnectionString = "Data source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio 2010WebSitesonlineshopApp_DataReg.mdf;Integrated Security=True;User Instance=True"
  • 2. conn.Open() Dim checkusr As String checkusr = "SELECT count(*) FROM REGTAB WHERE UNAME=@uname AND PWD=@pwd" Dim cmd As New SqlCommand(checkusr, conn) cmd.Parameters.AddWithValue("@uname", TextBox1.Text) cmd.Parameters.AddWithValue("@pwd", TextBox2.Text) Dim cu As Integer cu = Convert.ToInt32(cmd.ExecuteScalar) If cu = 1 Then Response.Redirect("product.aspx") Else Response.Write("USER NAME INCORRECT RETRY") End If cmd.ExecuteNonQuery() conn.Close() Catch ex As Exception Response.Write(ex.ToString) End Try End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Response.Redirect("Registrtion.aspx") End Sub End Class PRODUCT PAGE: Imports System.Web.UI.HtmlControls Imports System.Data.SqlClient Imports System.Configuration Partial Class Product Inherits System.Web.UI.Page Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click, ImageButton3.Click, ImageButton4.Click, ImageButton5.Click, ImageButton6.Click, ImageButton7.Click, ImageButton8.Click, ImageButton9.Click, ImageButton10.Click, ImageButton11.Click, ImageButton12.Click, ImageButton13.Click Try Dim conn = New SqlConnection conn.ConnectionString = "Data source=.SQLEXPRESS;AttachDbFilename=C:UsersGOKULDocumentsVisual Studio 2010WebSitesonlineshopApp_DataCART.mdf;Integrated Security=True;User Instance=True" conn.Open() Dim qry As String qry = "INSERT INTO CARTTAB (PRODUCTNAME,PRICE) VALUES (@PRODU,@PRICE)" Dim cmd As New SqlCommand(qry, conn) cmd.Parameters.AddWithValue("@PRODU", Label2.Text) cmd.Parameters.AddWithValue("@PRICE", Label3.Text) cmd.ExecuteNonQuery() Response.Write("PRODUCT SUCCESSFULLY ADDED TO CART") conn.Close() Catch ex As Exception Response.Write(ex.ToString) End Try End Sub End Class