How to write a file that called from a database on a page?
Posted
by Mehmet Kaleli
on Stack Overflow
See other posts from Stack Overflow
or by Mehmet Kaleli
Published on 2010-04-05T08:59:19Z
Indexed on
2010/04/05
9:03 UTC
Read the original article
Hit count: 278
response
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>
© Stack Overflow or respective owner