<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Blog: Using RadGrid</title> |
|
<style type="text/css"> |
.thislink:hover |
{ |
color:#DDD; |
text-decoration:underline; |
|
} |
.LinkStyle |
{color:Navy; font-size:small; font-weight:bold;} |
|
.LinkStyle:hover |
{ |
text-decoration:underline; |
color:Blue; |
|
} |
</style> |
</head> |
<body> |
<form id="frmBlog" runat="server"> |
<div> |
|
|
<div id="SubscribeMessage"><br /> |
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> |
</telerik:RadScriptManager> |
<br /> |
|
<a id="BloggerName" runat="server" style="font-size:small; font-weight:bold; color:Navy;" ></a> |
<h2><span class="style53">Welcome to our</span> <span class="style54">Podium!</span></h2> |
|
<p>Your views, comments, ideas, questions are all welcome here, feel free to share your mind with us!</p> |
|
</div> |
|
<div id="viewdirectorysection"> |
|
|
<asp:SqlDataSource ID="SqlDataBlogTopics" runat="server" |
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
SelectCommand="SELECT BlogID, BlogTopic, UserID, BlogMessage, BlogTopicCreatedDate FROM BlogTopics ORDER BY BlogID DESC"> |
</asp:SqlDataSource> |
|
<div style="font-size:small; color:Green; border-bottom:dotted 1px #DDD; padding-bottom:5px; padding-top:5px; margin-left:75px; width:670px;"><a id="A1" class="thislink" style="color:green; font-size:small; font-weight:bold;" runat="server" onserverclick ="ShowNewTopic" href="#">Start a Topic</a> <a style="color:#DDD; font-size:small;"> | </a> <a style="font-size:small; color:green; font-weight:bold; ">Join the discussion Today!</a><a style="color:#DDD; font-size:small;"> | </a> <a class="thislink" style="color:Green; font-size:small; font-weight:bold;" href="SignUp.aspx">Sign-up Free!</a></div> |
|
<telerik:RadGrid ID="RadGridBlogTopics" runat="server" AllowPaging="True" |
DataSourceID="SqlDataBlogTopics" GridLines="None" Skin="Web20" Width="670px" |
style="margin-left:70px;" BorderColor="White" BorderStyle="Solid" |
BorderWidth="1px"> |
|
<HeaderContextMenu EnableTheming="True"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</HeaderContextMenu> |
|
<MasterTableView AutoGenerateColumns="False" BorderColor="White" |
DataKeyNames="BlogID, BlogTopic, UserID, BlogMessage, BlogTopicCreatedDate" |
DataSourceID="SqlDataBlogTopics" GridLines="None" BorderStyle="None" |
BorderWidth="1px"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
|
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="BlogID" DataType="System.Int32" |
HeaderText="BlogID" ReadOnly="True" SortExpression="BlogID" UniqueName="BlogID" |
Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogTopic" HeaderText="BlogTopic" |
SortExpression="BlogTopic" UniqueName="BlogTopic" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="UserID" DataType="System.Int32" |
HeaderText="UserID" SortExpression="UserID" UniqueName="UserID" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogMessage" HeaderText="BlogMessage" |
SortExpression="BlogMessage" UniqueName="BlogMessage" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogTopicCreatedDate" |
HeaderText="BlogTopicCreatedDate" SortExpression="BlogTopicCreatedDate" |
UniqueName="BlogTopicCreatedDate" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn HeaderText="Topics" UniqueName="Topics"> |
<ItemTemplate> |
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True" |
Font-Size="Small" Font-Underline="False" ForeColor="#333399" |
Text='<%# Eval("BlogTopic") %>' onclick="LinkButton1_Click"></asp:LinkButton> |
</ItemTemplate> |
<HeaderStyle Font-Bold="True" Font-Size="Medium" /> |
</telerik:GridTemplateColumn> |
</Columns> |
<HeaderStyle BackColor="Navy" ForeColor="White" /> |
</MasterTableView> |
|
<SelectedItemStyle BackColor="White" BorderColor="White" ForeColor="White" /> |
|
<FilterMenu EnableTheming="True"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</FilterMenu> |
</telerik:RadGrid> |
|
|
<br /> |
|
<div id="StartNewTopic" style="border-top:dotted 1px Gray; font-size:small;width:670px; padding-top:5px; height:25px; margin-top:10px; margin-left:70px;" visible ="false" runat="server"> |
<table> |
<tr> |
<td><label id="Label8" style="font-size:small; color:#CC0000; font-weight:bold;" runat="server">Subject</label></td> |
</tr> |
<tr> |
<td><input id="txtTopic" runat="server" size="40" /></td> |
</tr> |
<tr> |
<td><label id="Label7" style="font-size:small; color:#CC0000; font-weight:bold;" runat="server">Discussion</label></td> |
</tr> |
<tr> |
<td><textarea id="TextArticle" runat="server" cols="60" rows ="8" /></td> |
</tr> |
<tr> |
<td><button id="Button1" runat ="server" onserverclick = "PostNewTopic" >Submit</button><button id="Button2" onserverclick ="CancelPost" runat ="server">Cancel</button></td> |
</tr> |
</table><br /> |
</div> |
|
<div id="Discussion" style="width:783px;" visible="false" runat="server"> |
<div id="TopicDiscussion" |
style="color:#CC0000; font-family:'Tahoma'; font-size:14pt; font-weight:bold; margin-left:70px; margin-top:20px; width:660px;" |
runat="server"></div> |
<div id="DiscussionBody" style="margin-left:70px; font-size:medium;width:670px;"> |
<table style="font-family:'Tahoma' "> |
<tr> |
<td><label id="Author" style="font-size:small; color:black; font-weight:bold;" runat="server"></label></td> |
<td><label id="Label1" style="font-size:small; font-weight:bold;" runat="server">|</label></td> |
<td><label id="Label2" style="font-size:small; font-weight:bold;" runat="server"> </label></td> |
<td><label id="articledate" style="color:black; color:Gray; font-size:small; font-weight:bold;" runat="server"></label></td> |
<td><label id="articletime" style="color:black; font-size:small; font-weight:bold;" runat="server"></label></td> |
<td><label id="Label3" style="font-size:small; font-weight:bold;" runat="server">|</label></td> |
<td><label id="lblComments" style="font-size:small; font-weight:bold;" runat="server"></label></td> |
</tr> |
</table><br /> |
</div> |
<div id="maindiscussion" style="color:black; font-family:'Tahoma'; border-bottom:dotted 1px Gray;font-size:small;width:670px; margin-left:70px; padding-bottom:10px;" runat="server"> |
|
</div> |
<div id="GridWrap" style="margin-top:10px; width:670px; margin-left:70px;"> |
<telerik:RadGrid ID="RadGridComments" runat="server" |
DataSourceID="SqlDataComments" GridLines="None" Skin="Web20" |
BorderColor="White"> |
<HeaderContextMenu EnableTheming="True" Skin="Office2007"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</HeaderContextMenu> |
|
<MasterTableView DataSourceID="SqlDataComments" AutoGenerateColumns="False" BorderColor="White" |
BorderWidth="1px" Frame="Void" GridLines="None"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
|
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="BlogComment" HeaderText="BlogComment" |
SortExpression="BlogComment" UniqueName="BlogComment" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogCommentDate" |
HeaderText="BlogCommentDate" SortExpression="BlogCommentDate" |
UniqueName="BlogCommentDate" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogCommentTime" |
HeaderText="BlogCommentTime" SortExpression="BlogCommentTime" |
UniqueName="BlogCommentTime" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" |
SortExpression="UserName" UniqueName="UserName" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogID" DataType="System.Int32" |
HeaderText="BlogID" SortExpression="BlogID" UniqueName="BlogID" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="BlogCommentID" DataType="System.Int32" |
HeaderText="BlogCommentID" ReadOnly="True" SortExpression="BlogCommentID" |
UniqueName="BlogCommentID" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn HeaderText="Comments" UniqueName="Comments"> |
<ItemTemplate><br /> |
<asp:Label ID="lblComments" runat="server" Font-Size="Small" |
ForeColor="#666666" Text='<%# Eval("BlogComment") %>'></asp:Label> |
<br /> |
<br /> |
<asp:Label ID="lblUser" runat="server" Font-Bold="True" Font-Size="Small" |
ForeColor="#CC0000" Text='<%# Eval("UserName") %>'></asp:Label><a> | </a><asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="Small" |
ForeColor="Gray" Text='<%# Eval("BlogCommentDate") %>'></asp:Label><a> | </a><asp:Label ID="Label6" runat="server" Font-Bold="True" Font-Size="Small" |
ForeColor="Gray" Text='<%# Eval("BlogCommentTime") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
</Columns> |
<HeaderStyle BackColor="White" Font-Bold="True" Font-Size="Medium" |
ForeColor="Black" /> |
</MasterTableView> |
|
<FilterMenu EnableTheming="True" Skin="Office2007"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</FilterMenu> |
</telerik:RadGrid> |
<asp:Label ID="lblSelectedTopic" runat="server" style="color:White; font-size:small;"></asp:Label> |
<asp:Label ID="lblUserID" runat="server" style="color:White; font-size:small;"></asp:Label> |
<asp:SqlDataSource ID="SqlDataComments" runat="server" |
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
|
|
SelectCommand="SELECT BlogThreads.BlogComment, BlogThreads.BlogCommentDate, BlogThreads.BlogCommentTime, Login.UserName, BlogThreads.BlogID, BlogThreads.BlogCommentID FROM BlogThreads INNER JOIN BlogTopics ON BlogThreads.BlogID = BlogTopics.BlogID INNER JOIN Login ON BlogThreads.UserID = Login.UserID WHERE (BlogTopics.BlogID = @BlogID) ORDER BY BlogThreads.BlogCommentID"> |
<SelectParameters> |
<asp:ControlParameter ControlID="lblSelectedTopic" Name="BlogID" |
PropertyName="Text" /> |
</SelectParameters> |
</asp:SqlDataSource> |
</div> |
<div id="CommentsMenu" style="margin-left:70px;" runat="server" > |
<a id="A2" class="LinkStyle" runat="server" onserverclick ="MakeComments" href="#">Add Comments</a> | <a id="A3" class="LinkStyle" href="#" runat ="server" onserverclick ="MakeComments" >Reply</a> | <a class="LinkStyle" href="#">Print</a> |
</div> |
|
<div id="CommentsBody" style="border-top:dotted 1px Gray; font-size:small;width:670px; padding-top:5px; height:25px; margin-top:10px; margin-left:70px;" visible ="false" runat="server"> |
<table> |
<tr> |
<td><label id="Label4" style="font-size:small; color:#CC0000; font-weight:bold;" runat="server">Type your comments...</label></td> |
</tr> |
<tr> |
<td><textarea id="txtMessage" runat="server" cols="60" rows ="8" /></td> |
</tr> |
<tr> |
<td><button id="btnComments" runat ="server" onserverclick = "ApplyComments" >Submit</button><button id="btnCancelComments" onserverclick ="CancelComments" runat ="server">Cancel</button></td> |
</tr> |
</table><br /> |
</div> |
</div> |
</div> |
<asp:label id="blognumber" runat="server" style="color:White; font-size:6pt;"></asp:label> |
</div> |
|
</div> |
</form> |
</body> |
</html> |
|