<%@ Page Language="C#" AutoEventWireup="true" CodeFile="showarticle.aspx.cs" Inherits="showarticle" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="articleID" DataSourceID="SqlDataSource1" GridLines="None" Width="100%" ShowHeader="False" OnRowDataBound="GridView1_RowDataBound">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <table cellspacing="0" class="auto-style1" dir="ltr" style="font-family: tahoma; font-size: 8pt; line-height: 25px;">
                            <tr>
                                <td dir="rtl" style="font-weight: bold">
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title", "{0}") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td dir="rtl">
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("Descriptions", "{0}") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td dir="ltr">
                                    <asp:Button ID="btnDisLike" runat="server" CommandArgument="<%# Container.DataItemIndex %>" Font-Names="Tahoma" Font-Size="8pt" Text="نمیپسندم" OnClick="btnDisLike_Click" />
                                    <asp:Button ID="btnLike" runat="server" CommandArgument="<%# Container.DataItemIndex %>" Font-Names="Tahoma" Font-Size="8pt" Text="میپسندم"  OnClick="btnLike_Click"/>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DataConnectionString %>" 
            SelectCommand="SELECT * FROM [articles] WHERE ([articleID] = @articleID)">
            <SelectParameters>
                <asp:QueryStringParameter Name="articleID" QueryStringField="id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
