Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Title="" Language="C#" MasterPageFile="~/mpage.master" AutoEventWireup="true"
- CodeFile="fullpost.aspx.cs" Inherits="_fullpost" %>
- <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
- <script src="js/popup.js" type="text/javascript"></script>
- <script src="js/popupRegister.js" type="text/javascript"></script>
- </asp:Content>
- <asp:Content ID="Content2" ContentPlaceHolderID="maincontent" runat="Server">
- <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" RenderOuterTable="False">
- <ItemTemplate>
- <div id="fullheader">
- <span class="fulltitle">
- <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Title") %>'></asp:Literal></span>
- <br />
- <span class="textSum">
- <asp:Literal ID="LitSummary" runat="server" Text='<%# Eval("Summary") %>'></asp:Literal></span>
- <span class="dateTime">
- <asp:Literal ID="Literal2" runat="server" Text='<%# Eval("CreateDateTime") %>'></asp:Literal></span>
- </div>
- <div id="fullbody">
- <span class="fullbodytext">
- <asp:Literal ID="LitBody" Text='<%# Eval("Body")%>' runat="server"></asp:Literal></span>
- </div>
- </ItemTemplate>
- </asp:FormView>
- <asp:FormView ID="FormView2" runat="server" RenderOuterTable="False" DataSourceID="SqlDataSource3">
- <ItemTemplate>
- <div id="fullcommentsnumber">
- <asp:Literal ID="Literalcount" runat="server" Text='<%# Eval("counter") %>'></asp:Literal>
- Comments
- </div>
- </ItemTemplate>
- </asp:FormView>
- <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
- <ItemTemplate>
- <div id="fullcommentheader">
- <span class="fullname">
- <asp:Literal ID="Literal3" runat="server" Text='<%# Eval("Name") %>'></asp:Literal></span>
- <br />
- <span class="fullbodytext">
- <asp:Literal ID="LitBody2" Text='<%# Eval("Comment")%>' runat="server"></asp:Literal></span>
- <span class="dateTime">
- <asp:Literal ID="Literal4" runat="server" Text='<%# Eval("CreateDateTime") %>'></asp:Literal></span>
- </div>
- <br />
- </ItemTemplate>
- </asp:Repeater>
- <asp:FormView ID="FormView3" runat="server" DataSourceID="SqlDataSource4" RenderOuterTable="False" DefaultMode="Insert">
- <InsertItemTemplate>
- Name:
- <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
- <br />
- E-mail:
- <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox>
- <br />
- Website:
- <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Website") %>'></asp:TextBox>
- <br />
- Comment:
- <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Comment") %>'></asp:TextBox>
- <br />
- pid:
- <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("PostId") %>'></asp:TextBox>
- <br />
- <asp:Button ID="postcomment" runat="server" Text="Button" CommandName="Insert" />
- </InsertItemTemplate>
- </asp:FormView>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:orangefreshConnectionString1 %>"
- SelectCommand="SELECT [Id], [Title], [Summary], [Body], [CreateDateTime] FROM [Post] WHERE ([Id] = @Id)">
- <SelectParameters>
- <asp:QueryStringParameter Name="Id" QueryStringField="Id" Type="Int32" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:orangefreshConnectionString1 %>"
- SelectCommand="SELECT [Id], [Name], [Email], [Website], [Comment], [CreateDateTime], [PostId] FROM [Comment] WHERE ([PostId] = @PostId)"
- DeleteCommand="DELETE FROM [Comment] WHERE [Id] = @Id"
- InsertCommand="INSERT INTO [Comment] ([Name], [Email], [Website], [Comment], [PostId]) VALUES (@Name, @Email, @Website, @Comment, @PostId)">
- <DeleteParameters>
- <asp:Parameter Name="Id" Type="Int32" />
- </DeleteParameters>
- <InsertParameters>
- <asp:Parameter Name="Name" Type="String" />
- <asp:Parameter Name="Email" Type="String" />
- <asp:Parameter Name="Website" Type="String" />
- <asp:Parameter Name="Comment" Type="String" />
- <asp:Parameter Name="CreateDateTime" Type="DateTime" />
- <asp:Parameter Name="PostId" Type="Int32" />
- </InsertParameters>
- <SelectParameters>
- <asp:QueryStringParameter Name="PostId" QueryStringField="Id" Type="Int32" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:orangefreshConnectionString1 %>"
- SelectCommand="SELECT count(*) as counter FROM [Comment] WHERE ([PostId] = @PostId)">
- <SelectParameters>
- <asp:QueryStringParameter Name="PostId" QueryStringField="Id" Type="Int32" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="SqlDataSource4" runat="server"
- ConnectionString="<%$ ConnectionStrings:orangefreshConnectionString1 %>"
- DeleteCommand="DELETE FROM [Comment] WHERE [Id] = @Id"
- InsertCommand="INSERT INTO [Comment] ([Name], [Email], [Website], [Comment], [PostId]) VALUES (@Name, @Email, @Website, @Comment, @PostId)"
- SelectCommand="SELECT [Name], [Email], [Website], [Comment], [PostId], [Id] FROM [Comment]"
- UpdateCommand="UPDATE [Comment] SET [Name] = @Name, [Email] = @Email, [Website] = @Website, [Comment] = @Comment, [PostId] = @PostId WHERE [Id] = @Id">
- <DeleteParameters>
- <asp:Parameter Name="Id" Type="Int32" />
- </DeleteParameters>
- <InsertParameters>
- <asp:Parameter Name="Name" Type="String" />
- <asp:Parameter Name="Email" Type="String" />
- <asp:Parameter Name="Website" Type="String" />
- <asp:Parameter Name="Comment" Type="String" />
- <asp:Parameter Name="PostId" Type="Int32" />
- </InsertParameters>
- <UpdateParameters>
- <asp:Parameter Name="Name" Type="String" />
- <asp:Parameter Name="Email" Type="String" />
- <asp:Parameter Name="Website" Type="String" />
- <asp:Parameter Name="Comment" Type="String" />
- <asp:Parameter Name="PostId" Type="Int32" />
- <asp:Parameter Name="Id" Type="Int32" />
- </UpdateParameters>
- </asp:SqlDataSource>
- <script type="text/javascript">
- (function () {
- $('dd').filter(':nth-child(n+4)').addClass('hide');
- $('dl').on('mouseup', 'dt', function () {
- $(this)
- .next()
- .slideDown(300)
- .siblings('dd')
- .slideUp(300);
- });
- $("#loginimg").toggle(
- function () {
- $("#loginscreen").animate({ width: 'toggle' }, 350);
- $(this).animate({ "right": "200px" }, 350);
- $(this).css("background-image", "url(images/logindown.png)");
- },
- function () {
- $("#loginscreen").animate({ width: 'toggle' }, 350);
- $(this).animate({ "right": "0px" }, 350);
- $(this).css("background-image", "url(images/loginup.png)");
- });
- })();
- </script>
- </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement