Hy!
I'm making a little commenting module for news section of my little
homepage. And I don't know how to embed viewing news comments into it.
I have repeater like this:
<asp:Repeater ID="news" Runat="server">
<ItemTemplate>
<table width="100%">
<tr bgcolor="#c6c8b9">
<td class="newsTitle"><%# DataBinder.Eval(Container.DataItem, "Title")%>
</td>
<td width="100" align="right"><%# DataBinder.Eval(Container.DataItem,
"Date")%> </td>
</tr>
<tr bgcolor="#d5d3ca">
<td colspan="2" class="text"><%# DataBinder.Eval(Container.DataItem,
"Body")%><br><br>
<!-- comments goes right here (somewhere) -->
</td>
</tr>
</table>
<br>
</ItemTemplate>
</asp:Repeater>
I then bind datasource to SqlDataSource (.NET 2.0) -- like this -->
news.DataSourceID = NewsDS.ID; (pretty much no interaction going on here).
I have tables news (columns id, title, body, date) and news_comments
(columns id, body, news_id). news_id is a id of a news to which comment
belongs.
What I don't know is, how to select the correct comments and add them into
the repeater (I've commented the place where I want comments to be).
Can anyone help me with any solution?
-- Samo Kralj 3 1275
One more thing... I want all this to be done once (at the page load),
becouse I have then client side code to expand/collapse those comments (it
isnt seen from code I provided, but I think it is not relavant here).
"SamoK" <sn***@wetsoftware.com> wrote in message
news:5r******************@news.siol.net... Hy!
I'm making a little commenting module for news section of my little homepage. And I don't know how to embed viewing news comments into it.
I have repeater like this: <asp:Repeater ID="news" Runat="server"> <ItemTemplate> <table width="100%"> <tr bgcolor="#c6c8b9"> <td class="newsTitle"><%# DataBinder.Eval(Container.DataItem,
"Title")%> </td> <td width="100" align="right"><%# DataBinder.Eval(Container.DataItem, "Date")%> </td> </tr> <tr bgcolor="#d5d3ca"> <td colspan="2" class="text"><%# DataBinder.Eval(Container.DataItem, "Body")%><br><br> <!-- comments goes right here (somewhere) --> </td>
</tr> </table> <br> </ItemTemplate> </asp:Repeater>
I then bind datasource to SqlDataSource (.NET 2.0) -- like this --> news.DataSourceID = NewsDS.ID; (pretty much no interaction going on here).
I have tables news (columns id, title, body, date) and news_comments (columns id, body, news_id). news_id is a id of a news to which comment belongs.
What I don't know is, how to select the correct comments and add them into the repeater (I've commented the place where I want comments to be).
Can anyone help me with any solution?
-- Samo Kralj
On Sun, 4 Jul 2004 10:51:48 +0200, SamoK <sn***@wetsoftware.com> wrote: One more thing... I want all this to be done once (at the page load), becouse I have then client side code to expand/collapse those comments (it isnt seen from code I provided, but I think it is not relavant here).
"SamoK" <sn***@wetsoftware.com> wrote in message news:5r******************@news.siol.net... Hy!
I'm making a little commenting module for news section of my little homepage. And I don't know how to embed viewing news comments into it.
I have repeater like this: <asp:Repeater ID="news" Runat="server"> <ItemTemplate> <table width="100%"> <tr bgcolor="#c6c8b9"> <td class="newsTitle"><%# DataBinder.Eval(Container.DataItem, "Title")%> </td> <td width="100" align="right"><%# DataBinder.Eval(Container.DataItem, "Date")%> </td> </tr> <tr bgcolor="#d5d3ca"> <td colspan="2" class="text"><%# DataBinder.Eval(Container.DataItem, "Body")%><br><br> <!-- comments goes right here (somewhere) --> </td>
</tr> </table> <br> </ItemTemplate> </asp:Repeater>
I then bind datasource to SqlDataSource (.NET 2.0) -- like this --> news.DataSourceID = NewsDS.ID; (pretty much no interaction going on here).
I have tables news (columns id, title, body, date) and news_comments (columns id, body, news_id). news_id is a id of a news to which comment belongs.
What I don't know is, how to select the correct comments and add them into the repeater (I've commented the place where I want comments to be).
Can anyone help me with any solution?
-- Samo Kralj
It sounds like you're doing things very similar to this example from MSDN
magazine: http://msdn.microsoft.com/msdnmag/is...g/default.aspx
I use this blog app myself (well, I did port it to C# w/ some mods) and it
does what you're doing. Your answer and examples are in there.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Thanks Craig... I found that link very useful... and it works now :)
Thanks again!
-- Samo
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:opsamlhzvo75dg5d@g51y101... On Sun, 4 Jul 2004 10:51:48 +0200, SamoK <sn***@wetsoftware.com> wrote:
One more thing... I want all this to be done once (at the page load), becouse I have then client side code to expand/collapse those comments (it isnt seen from code I provided, but I think it is not relavant here).
"SamoK" <sn***@wetsoftware.com> wrote in message news:5r******************@news.siol.net... Hy!
I'm making a little commenting module for news section of my little homepage. And I don't know how to embed viewing news comments into it.
I have repeater like this: <asp:Repeater ID="news" Runat="server"> <ItemTemplate> <table width="100%"> <tr bgcolor="#c6c8b9"> <td class="newsTitle"><%# DataBinder.Eval(Container.DataItem, "Title")%> </td> <td width="100" align="right"><%# DataBinder.Eval(Container.DataItem, "Date")%> </td> </tr> <tr bgcolor="#d5d3ca"> <td colspan="2" class="text"><%#
DataBinder.Eval(Container.DataItem, "Body")%><br><br> <!-- comments goes right here (somewhere) --> </td>
</tr> </table> <br> </ItemTemplate> </asp:Repeater>
I then bind datasource to SqlDataSource (.NET 2.0) -- like this --> news.DataSourceID = NewsDS.ID; (pretty much no interaction going on here).
I have tables news (columns id, title, body, date) and news_comments (columns id, body, news_id). news_id is a id of a news to which comment belongs.
What I don't know is, how to select the correct comments and add them into the repeater (I've commented the place where I want comments to be).
Can anyone help me with any solution?
-- Samo Kralj
It sounds like you're doing things very similar to this example from MSDN magazine:
http://msdn.microsoft.com/msdnmag/is...g/default.aspx
I use this blog app myself (well, I did port it to C# w/ some mods) and it does what you're doing. Your answer and examples are in there.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fraggle |
last post by:
I have a repeater with controls added at run time. the <template> also
contains a <asp:textbox that is made visible on some repeater
elements.
when I come to read the text info out it has...
|
by: olduncleamos |
last post by:
Hello all,
I am experimenting with the repeater control and ran into something
that I wasn't expecting. I would appreciate if the experts can confirm
or correct my understanding.
Here is a...
|
by: Andrew |
last post by:
Hi,
I am working on a questionnaire. I have displayed a questionnaire using a
repeater control. The itemtemplate is as below (quite cut down):
<ItemTemplate>
<tr><td>
<%#...
|
by: Brian |
last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the
RadioButtonList within a Repeater ItemTemplate.
I've tried a number of approaches, but I haven't...
|
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= |
last post by:
I'm doing a web app in VB/Dot Net 2.0. I'm probably a bit rusty and I have
no experience using the repeater control.
I have a user control I've created with multiple properties. I've created a...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |