-
-
Save gregperes/cfea75c1762006738803 to your computer and use it in GitHub Desktop.
Palestra Arquitetura Web Desacoplada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
Dim cn = "ConnectionString" | |
Set conn = Server.CreateObject("ADODB.Connection") | |
conn.Open cn | |
Dim query = "SELECT * FROM todos ORDER BY created_at DESC" | |
Set rs = Server.CreateObject("ADODB.RecordSet") | |
rs.Open sql, conn | |
%> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>ASP Sample</title> | |
<script type="text/javascript"> | |
document.body.onload = function () { | |
document.getElementByTagName("checkbox").onclick = function () { | |
alert("Yeah! Just complete a todo :)"); | |
}; | |
}; | |
</script> | |
</head> | |
<body> | |
<ul> | |
<% | |
Do While Not rs.EOF | |
%> | |
<li> | |
<input type="checkbox" name="todo-<%=rs.Fields("id")%>" value="<%=rs.Fields("id")%>"> | |
<%=rs.Fields("description")%> | |
</li> | |
<% | |
objRS.MoveNext() | |
Loop | |
%> | |
</ul> | |
</body> | |
</html> | |
<% | |
Set rs = Nothing | |
Set conn = Nothing | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment