How to write a file that called from a database on a page?
- by Mehmet Kaleli
Hi. I have a "news" page that belongs to a company. All news have a header, detail and html page and they come from database. So i have to print those html pages in a repeater on my "news.aspx". But i couldnt write dynamically. How can i do it or is there anyway else?
<asp:Repeater ID="news" runat="server" OnItemDataBound="news_OnItemDataBound">
<ItemTemplate>
<asp:HiddenField ID="newsid" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"newsid") %>' />
<tr>
<td class="haberler-sayfasi-habermetni" style="width:580px;padding-bottom:30px;">
<h1 class="haberler-sayfasi-haberbasligi" style="background-image:url(images/haber-ikon.jpg); background-repeat:no-repeat;padding-left:25px;">
<%#DataBinder.Eval(Container.DataItem,"newsheader") %>/h1>
<br />
<%#DataBinder.Eval(Container.DataItem,"newsspot") %>
<br /><br />
<%
**Response.WriteFile('dynamical filename with path');**
%>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>