0

I have a Form Code Like this

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

<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table align="center">
                    <tr style ="border-width: 1px">
                        <td>
                              Sales Details
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LblCompanyName" runat="server" Text="CompanyName"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtCompanyName" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtCompanyName"
                                ErrorMessage="Enter Company Name" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td style="height: 26px">
                            <asp:Label ID="LblSize" runat="server" Text="Size"></asp:Label>
                        </td>
                        <td style="height: 26px">
                            <asp:TextBox ID="TxtSize" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtSize"
                                ErrorMessage="Enter Size Of The Company" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LblDescription" runat="server" Text="Description"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtDescription" runat="server" TextMode="MultiLine" Width="149px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxtDescription"
                                ErrorMessage="Enter Description Of The Company" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LblExpRevenue" runat="server" Text="Expected Revenue"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtExpRevenue" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TxtExpRevenue"
                                ErrorMessage="Enter Revenue Of The Company" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LblContactNo" runat="server" Text="Contact Number"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtContactNo" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TxtContactNo"
                                ErrorMessage="Enter Contact person Of The Company" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LblBoardNo" runat="server" Text="Board Number"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtBoardNo" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtBoardNo"
                                ErrorMessage="Enter Board Number" ValidationGroup="validation">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr align ="center">
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" ValidationGroup="Validation"/>
                            <asp:Label ID="lbl" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="Validation" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:FileUpload ID="FileUploader1" runat ="server"/>
                        </td>
                        <td>
                            <asp:Button ID="UploadBtn" Text="Upload File" runat="server" OnClick="UploadBtn_Click" />
                        </td>
                    </tr>
                </table>
    </div>
    </form>
</body>
</html>

When button UpLoadFile clicked the values in the Excel sheet which i have. should display in the textbox controls.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by dnanetwork
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.