forked from JAMK-ICT-IIO13200/viikkotehtava-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
g2456_dbcontrols2.aspx
39 lines (34 loc) · 1.15 KB
/
g2456_dbcontrols2.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="g2456_dbcontrols2.aspx.cs" Inherits="g2456_dbcontrols2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource
ID="srcMovies"
ConnectionString="Data Source=eight.labranet.jamk.fi;Initial Catalog=Movie;Persist Security Info=True;User ID=koodari;Password=koodari13"
SelectCommand="SELECT title, director, year FROM Movies ORDER BY title"
runat="server">
</asp:SqlDataSource>
<asp:DetailsView
ID="DetailsView1"
DataSourceID="srcMovies"
runat="server"
AllowPaging="true">
</asp:DetailsView>
<asp:FormView
ID="FormView1"
DataSourceID="srcMovies"
runat="server"
AllowPaging="true">
<ItemTemplate>
<h3><%#Eval("title") %></h3> directed by <%#Eval("director") %>
</ItemTemplate>
</asp:FormView>
</div>
</form>
</body>
</html>