<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
SqlConnection myConnection;
string strConnectionString;
protected void Page_Load(Object Src, EventArgs E)
{
myConnection = new SqlConnection("");
myConnection.ConnectionString = strConnectionString;
myConnection.Open();
String strSql = "SELECT * FROM upload WHERE Doc_ID = @Doc_ID ";
Request.QueryString.Get("Doc_ID");
SqlDataReader odDataReader;
SqlCommand odCmd;
odCmd = new SqlCommand(strSql, myConnection);
odDataReader = odCmd.ExecuteReader();
lbl1.text = odDataReader["Nome"].toString();
lbl2.text = odDataReader["Cognome"].toString();
lbl3.text = odDataReader["Titolo"].toString();
myConnection.Close();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ItemTemplate>
Autore:
<asp:Label ID="lbl1" runat="server" Width="100" Text='<%# Eval("Nome") %>'></asp:Label>
<asp:Label ID="lbl2" runat="server" Width="100" Text='<%# Eval("Cognome") %>'></asp:Label>
<asp:Label ID="lbl3" runat="server" Width="100" Text='<%# Eval("Titolo") %>'></asp:Label>
</div>
</form>
</body>
</html>