yo pongo es te simple codigo no?
Código:
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<HTML>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
SqlConnection conexion = new
SqlConnection("Server=localhost;Database=pubs;User ID=pepe;Password=123");
SqlDataAdapter comando = new SqlDataAdapter("select * from Titles", conexion);
DataSet ds = new DataSet();
comando.Fill(ds, "Titles");
repiteDatos.DataSource = ds.Tables["Titles"].DefaultView;
repiteDatos.DataBind();
}
</script>
<body>
<asp:Repeater id="repiteDatos" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr bgcolor="ff00d8">
<th>
Título</th>
<th>
Unidades</th>
<th>
Fecha publicación</th>
<th>
Ventas</th>
<th>
Precio</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor="FFECD8">
<td><%# DataBinder.Eval(Container.DataItem, "titulo") %></td>
<td align="right">
<%# DataBinder.Eval(Container.DataItem, "unidades","{0:#,###}") %>
</td>
<td align="right">
<%# DataBinder.Eval(Container.DataItem, "fecha","{0:m}") %>
</td>
<td align="right">
<%# DataBinder.Eval(Container.DataItem, "ventas","{0:g}") %>
</td>
<td align="right">
<%# DataBinder.Eval(Container.DataItem, "precio", "{0:0#.00} €") %>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</body>
</HTML>
y nada, me tira este error choto
Login failed for user 'pepe'. Reason: Not associated with a trusted SQL Server connection.
ya no se que hacer, le di todos los permisos al pepe y nada, me estoy volviendo loco...
Gracias por cualquier info