<%@ page language="C#" masterpagefile="~/login/Super Admin.master" autoeventwireup="true" inherits="add_news, App_Web_add news.aspx.6cb53fb3" title="Welcome To Lokmangal Institute of Versatile Education" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
       
        .style101405
        {
            text-align: left;
            color: #000000;
           
            font-family: Verdana;
            font-size: 10pt;
        }
        .style101406
        {
            color: #000000;
            text-align: left;
            font-family: Verdana;
            font-size: 9pt;
         
        }
        .style101408
        {
            color: #000000;
            text-align: left;
            font-family: Verdana;
            font-size: 9pt;
           
            font-weight: normal;
        }
       
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style3" style="text-align: center">
        <tr>
            <td style="font-family: Verdana; font-size: 10pt">
                <table class="style3" style="font-weight: 700; width: 923px;">
                    <tr>
                        <td class="style101405">
                            Add News:</td>
                        <td style="text-align: left">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style101408">
                            Enter News :</td>
                        <td style="text-align: left">
                            <asp:TextBox ID="TextBox1" runat="server" Width="503px" TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style101408">
                            Any Attachment :</td>
                        <td style="text-align: left">
                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                                Height="16px" onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
                                Width="87px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem>Yes</asp:ListItem>
                                <asp:ListItem>No</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style101408">
                            <asp:Label ID="Label1" runat="server" Text="Select Attachment :" 
                                Visible="False"></asp:Label>
                            &nbsp;</td>
                        <td style="text-align: left">
                            <asp:FileUpload ID="FileUpload1" runat="server" Visible="False" />
                            <asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style101406">
                            &nbsp;</td>
                        <td style="text-align: left">
                            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                                style="font-weight: 700" Text="Submit" Width="182px" />
                            <asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" 
                    CellPadding="4" CellSpacing="2" DataKeyNames="Sr_No" 
                    DataSourceID="AccessDataSource1" ForeColor="Black" style="font-size: 9pt" 
                    Width="918px">
                    <RowStyle BackColor="White" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                        <asp:BoundField DataField="Sr_No" HeaderText="Sr_No" ReadOnly="True" 
                            SortExpression="Sr_No" />
                        <asp:BoundField DataField="Heading" HeaderText="Heading" 
                            SortExpression="Heading" />
                        <asp:TemplateField HeaderText="Attachment" SortExpression="Attachment">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Attachment") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# Eval("Attachment", "../news/{0}") %>' Text='<%# "Download" %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
                    ConflictDetection="CompareAllValues" DataFile="~/App_Data/superwit.mdb" 
                    DeleteCommand="DELETE FROM [news] WHERE [Sr_No] = ? " 
                    InsertCommand="INSERT INTO [news] ([Heading], [Attachment], [Sr_No]) VALUES (?, ?, ?)" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectCommand="SELECT * FROM [news] ORDER BY [Sr_No] DESC" 
                    UpdateCommand="UPDATE [news] SET [Heading] = ?, [Attachment] = ? WHERE [Sr_No] = ? ">
                    <DeleteParameters>
                        <asp:Parameter Name="original_Sr_No" Type="Int32" />
                        <asp:Parameter Name="original_Heading" Type="String" />
                        <asp:Parameter Name="original_Attachment" Type="String" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Heading" Type="String" />
                        <asp:Parameter Name="Attachment" Type="String" />
                        <asp:Parameter Name="original_Sr_No" Type="Int32" />
                        <asp:Parameter Name="original_Heading" Type="String" />
                        <asp:Parameter Name="original_Attachment" Type="String" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="Heading" Type="String" />
                        <asp:Parameter Name="Attachment" Type="String" />
                        <asp:Parameter Name="Sr_No" Type="Int32" />
                    </InsertParameters>
                </asp:AccessDataSource>
            </td>
        </tr>
    </table>
</asp:Content>

