Hi,
I'm working on a specific part of a website that displays a blog and allows users to comment on the blog. Currently, the page starts with a bar with the title of the blog post, who posted it, and the amount of comments on the blog. When you click on the title it expands downwards and displays the blog. Below this, there is a bar stating how many comments it has, and if you click on that then you get another menu drop down where you can enter your name, website and your comment. When you click submit it posts your comment on the blog. And this is where my problems start.
After posting the comment, when I click the bar that is displaying the amount of comments (the bar I clicked to extend the comments section) it retracts to it's original position. But when I try to click on the original box that dropped the whole blog section down, it doesn't do anything. No errors are given, and it will not collapse on click in any browser.
Here is the code of the blog section for which i just described:
<ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server"
BehaviorId='<%#String.Format("cpeBehavior{0}", Eval("ID")) %>'
TargetControlID="ClientInfoPanel"
CollapsedSize="0"
Collapsed="True"
ExpandControlID="CaseStudyName"
CollapseControlID="CaseStudyName"
ImageControlID="HideShowImage"
ExpandedImage="/Images/ClientList/client_expanded.gif"
CollapsedImage="/Images/ClientList/client_collapsed.gif"
ExpandDirection="Vertical"
/>
<asp:Panel ID="ClientInfoPanel" runat="server" style="width:735px;">
<div class="client_info_outer blog_post_container">
<div class="client_info">
<div class="blog_desc_mid">
<div class="client_desc_top blog_desc_top blog_content">
<%#Eval("Content")%>
<div class="clear"></div>
</div>
<div class="comments_box blog_comments_box">
<asp:UpdatePanel ID="CommentsUP" runat="server">
<ContentTemplate>
<ajaxToolkit:CollapsiblePanelExtender ID="cpeComments" runat="Server"
BehaviorId='<%#String.Format("cpeComsBehavior{0}", Eval("ID")) %>'
TargetControlID="CommentsPanel"
CollapsedSize="0"
Collapsed="True"
ExpandControlID="OpenCommentsPanel"
CollapseControlID="OpenCommentsPanel"
ExpandDirection="Vertical" />
<asp:Panel ID="CommentsPanel" runat="server" DefaultButton="SubmitCommentBtn">
<div class="comments_panel">
<div class="comments_inner">
<div class="comments_inner_inner">
<asp:Repeater ID="CommentsRep" runat="server" OnItemDataBound="CommentsRep_ItemDataBound">
<ItemTemplate>
<div class="comment">
<p class="comment_author"><asp:Literal ID="CommentInfoLtl" runat="server" /></p>
<div class="comment_content">
<asp:Literal ID="ContentLtl" runat="server" />
</div>
</div>
</ItemTemplate>
</asp:Repeater>
<p class="special_field">
<label>Leave this field blank</label>
<asp:TextBox ID="SpecialTxt" runat="server" />
</p>
<p>
<label>Your Name</label>
<asp:TextBox ID="NameTxt" runat="server" />
<asp:RequiredFieldValidator ID="NameReqVal" runat="server" ControlToValidate="NameTxt" ErrorMessage="Required field" Display="Dynamic" CssClass="val" />
</p>
<p>
<label>URL</label>
<asp:TextBox ID="URLTxt" runat="server" />
<asp:PlaceHolder ID="URLErrorPH" runat="server" Visible="false">
<span class="val">Please ensure that the URL begins with 'http://'</span>
</asp:PlaceHolder>
</p>
<p>
<label>Add your comment</label>
<asp:TextBox ID="CommentTxt" runat="server" TextMode="MultiLine" />
<asp:RequiredFieldValidator ID="CommentReqVal" runat="server" ControlToValidate="CommentTxt" ErrorMessage="Required field" Display="Dynamic" CssClass="val" />
</p>
<p><asp:Button ID="SubmitCommentBtn" runat="server" Text="SUBMIT" CssClass="submit_comment_btn" CommandArgument='<%#Eval("ID") %>' OnCommand="SubmitCommentBtn_Command" /></p>
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="OpenCommentsPanel" runat="server" CssClass="open_comments">
<p>This article has <span><asp:Literal ID="CommentsLtl" runat="server" Text="0" /></span></p>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SubmitCommentBtn" EventName="Command" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
<div class="blog_bookmark_box">
<CC:Bookmark ID="CaseStudyBookmark" runat="server" ItemID='<%#Eval("ID") %>' />
</div>
<p class="close_btn"><input type="image" src="/Images/ClientList/client_close_btn.png" alt="Close" onclick="Tabs.CloseCpe(<%#Eval("ID") %>);return false;" /></p>
<div class="clear"></div>
</div>
</div>
</asp:Panel>
I am also very new to .NET (I have only been doing it for two weeks) and this isn't my code but I'm unable to ask them at the moment about what they done. If anyone could help me I'd very much appreciate it!
Cheers, Michael