Saturday, April 18, 2009

LEARN ASP.NET



















click here to view the code and output of an aspx file

FREE ASP.NET WEB HOSTING

nl/l@123
aspspider.net is providing free web hosting of your asp.net files.
It will be useful for learning asp.net and display your college project
For example, yesterday I created my website there. Its name is http://aspspider.ws/lamens/
You can use their MS Access or sql server.

Friday, April 17, 2009

ASP.NET TUTORIAL MS ACCESS CONNECTIVITY








<%@ Page Language="VB" Debug="true" %>

<%@ Import Namespace="System.Data.OleDb" %>


<script runat="server">

Sub Page_Load()

Dim sql As String

Dim dbcomm As OleDbCommand

Dim dbconn As OleDbConnection

Dim dbread As OleDbDataReader

dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source="
& Server.MapPath("emp.mdb"))

dbconn.Open()

sql = "select * from emp"

dbcomm = New OleDbCommand(sql, dbconn)

dbread = dbcomm.ExecuteReader()

employees.DataSource = dbread

employees.DataBind()

dbread.Close()

dbconn.Close()

End Sub

</script>


<html>

<body>




<asp:Repeater id="employees" runat="server">


<HeaderTemplate>

<table border="1" width="250">

<tr>

<th>Employee Name</th>

<th>Post</th>


</tr>

</HeaderTemplate>


<ItemTemplate>

<tr>

<td><%#Container.DataItem("employee_name")%></td>

<td><%#Container.DataItem("post")%></td>


</tr>

</ItemTemplate>


<FooterTemplate>

</table>

</FooterTemplate>


</asp:Repeater>




</body>

</html>



Followers