Click here to Skip to main content
15,881,803 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTree view Pin
hahii18-May-09 11:50
hahii18-May-09 11:50 
AnswerRe: Tree view Pin
alisolution20-May-09 21:00
alisolution20-May-09 21:00 
QuestionGenerating site "posts" Pin
teejayem18-May-09 10:38
teejayem18-May-09 10:38 
AnswerRe: Generating site "posts" Pin
Yusuf18-May-09 11:54
Yusuf18-May-09 11:54 
GeneralRe: Generating site "posts" Pin
teejayem18-May-09 12:01
teejayem18-May-09 12:01 
AnswerRe: Generating site "posts" Pin
teejayem18-May-09 12:41
teejayem18-May-09 12:41 
AnswerRe: Generating site "posts" Pin
PauloCastilho18-May-09 12:52
PauloCastilho18-May-09 12:52 
GeneralRe: Generating site "posts" Pin
teejayem18-May-09 13:22
teejayem18-May-09 13:22 
Sweet! That was easy enough Smile | :) For future readers this is the result that paulo helped me come up with


in the aspx file:

<asp:Repeater runat="server" ID="postRepeater">
    <HeaderTemplate>
        <div class="post">
    </HeaderTemplate>
    <ItemTemplate>
        <h2>
            <%#DataBinder.Eval(Container.DataItem, "Header")%></h2>
        <p>
            <%#DataBinder.Eval(Container.DataItem, "Content")%></p>
    </ItemTemplate>
    <FooterTemplate>
        </div>
    </FooterTemplate>
</asp:Repeater>


and in the code behind:

System.Data.DataTable dt = new System.Data.DataTable("Posts");
dt.Columns.Add(new System.Data.DataColumn("Header"));
dt.Columns.Add(new System.Data.DataColumn("Content"));

System.Data.DataRow row = dt.NewRow();

row[0] = "Header 1";
row[1] = "Content 1";

dt.Rows.Add(row);

postRepeater.DataSource = dt;
postRepeater.DataBind();


Thanks again Smile | :)

Don't be overcome by evil, but overcome evil with good

QuestionWrite to CSV in C# asp.net Pin
Civic0618-May-09 7:50
Civic0618-May-09 7:50 
AnswerRe: Write to CSV in C# asp.net Pin
ToddHileHoffer18-May-09 8:16
ToddHileHoffer18-May-09 8:16 
GeneralRe: Write to CSV in C# asp.net Pin
Civic0619-May-09 4:21
Civic0619-May-09 4:21 
GeneralRe: Write to CSV in C# asp.net Pin
ToddHileHoffer19-May-09 4:37
ToddHileHoffer19-May-09 4:37 
QuestionWhy does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 4:18
bigmish218-May-09 4:18 
AnswerRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
Ian McCaul18-May-09 4:47
Ian McCaul18-May-09 4:47 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 5:04
bigmish218-May-09 5:04 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
El_Programmer18-May-09 5:25
El_Programmer18-May-09 5:25 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 6:06
bigmish218-May-09 6:06 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
El_Programmer18-May-09 6:31
El_Programmer18-May-09 6:31 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
N a v a n e e t h18-May-09 6:37
N a v a n e e t h18-May-09 6:37 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 7:21
bigmish218-May-09 7:21 
QuestionSession Size Pin
mehrdadc4818-May-09 4:11
mehrdadc4818-May-09 4:11 
AnswerRe: Session Size Pin
N a v a n e e t h18-May-09 6:13
N a v a n e e t h18-May-09 6:13 
AnswerRe: Session Size Pin
Yusuf18-May-09 6:46
Yusuf18-May-09 6:46 
AnswerRe: Session Size Pin
Manas Bhardwaj18-May-09 9:08
professionalManas Bhardwaj18-May-09 9:08 
QuestionSet Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Pawan Kiran18-May-09 3:38
Pawan Kiran18-May-09 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.