home

Asp.net Steps To Connect Db Tutorial


First design the web page using web server controls, for example form, button, labels. Then connect your buttons to subroutines, using onclick="name of subroutine". After that Import the libraries, for example <%@ Import Namespace=”System.Data” %>

At the end make a script block and put your sub routines inside, like this
<script runat="server">

sub AddProd(Sender as object, e as EventArgs)

'All programming goes here

end sub

</script>

Add following 5 steps to above mentioned sub routine
5 step to make any programming logic in a sub routines
'Step1: Make a connection to databse, declare an object of SQLConnection Class and pass it's argument
'Step2: Pass a query to database, declare an object of SQLCommand Class and pass it's argument
'Step3: Open the connection
'Step4: Run your query
'Step5: Close your connection


Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

all rights reseverd by Cramerz.com©. web development by web design company DotPeak. hosting by HostBay
all contents on cramerz are the property of Cramerz.com. web design courses