HTML Sorce at same time

Status
Not open for further replies.
I have been looking through the ASP tutorial learning i think i am getting most of it. could some one show me an example of a loop and echo on a player for x-kings.com

It would be great to see an example of the asp code. I would perfer VBScript but i will take what ever i can get.

How ever is willing to help thanks a bunch.
 
I used ASP.net.
ASP is not worth learning.


<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" Debug="True" %>
<%@ Import Namespace="System.Data.SqlClient" %>


<script runat="server">
Sub Page_load
Dim myConn As SqlConnection
Dim myQuery As String
Dim myCmd As SqlCommand
Dim scorereader As SqlDataReader
myConn = New SqlConnection("server=desktop;uid=sa;pwd=developer;database=techforum")
myQuery = "select score from player"
myCmd = New SqlCommand(myQuery,myConn)
myConn.Open()
scorereader = myCmd.ExecuteReader()
displayarea.DataSource = scorereader
displayare.DataBind()
scorereader.Close()
myConn.Close
End Sub
</script>

<html>
<body>
<form runat="server">
<asp:datalist runat="server" ID="displayarea">
<itemtemplate>
<%# Container.DataItem("score") %>


</itemtemplate>
</asp:datalist>
</form>
</body>
</html>



You can also find the sum in the same way. This is a very basic way. There are many more methods available.
Similarly sum can also be found out.
 
ASP.net is great. But for web development PHP is also cool.

ASP.net is if you want integration with other languages like VB.net, C#, C++, JScript etc. It works only on Windows Platform.
 
Status
Not open for further replies.
Back
Top Bottom