This is a migrated thread and some comments may be shown as answers.

stackoverflow exception

2 Answers 39 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Stuart
Top achievements
Rank 1
Stuart asked on 31 Oct 2008, 09:59 AM
Hi

I am recieving a stackoverflow vs debug error when i try to execute the following code

            RadPanelItem it = new RadPanelItem("Root1");  
            HtmlGenericControl control = new HtmlGenericControl("div");  
            control.InnerHtml = "<table style='width:660px'><tr>"+thread.subject+"<td></td>"+GetDateDiference(thread.lastpostDate)+"<td></td></tr><tr><td>Posted by: "+thread.CMSMember.username+"</td><td>Replies:"+thread.CMSForumMessages.Count+"</td></tr><tr><td colspan='2'>"+GetThreadReplyLinkCommand()+"</td></tr></table>";  
            it.Controls.Add(it);                      
            threadsBar.Items.Add(it); 



what am i doing wrong ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 31 Oct 2008, 11:20 AM
Hello Stuart,

Here's your modified code that works as expected.

RadPanelItem it = new RadPanelItem("Root1");     
HtmlGenericControl control = new HtmlGenericControl("div");     
control.InnerHtml = "<table style='width:660px'><tr>"+thread.subject+"<td></td>"+GetDateDiference(thread.lastpostDate)+"<td></td></tr><tr><td>Posted by: "+thread.CMSMember.username+"</td><td>Replies:"+thread.CMSForumMessages.Count+"</td></tr><tr><td colspan='2'>"+GetThreadReplyLinkCommand()+"</td></tr></table>";     
it.Controls.Add(control);                         
threadsBar.Items.Add(it);    
 


Best wishes,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Stuart
Top achievements
Rank 1
answered on 31 Oct 2008, 12:36 PM
Thank you I see my mistake

Tags
PanelBar
Asked by
Stuart
Top achievements
Rank 1
Answers by
Paul
Telerik team
Stuart
Top achievements
Rank 1
Share this question
or