Advertisement

06.26.2008 at 08:28AM PDT, ID: 23518580
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

HTML table is duplicating itself at the bottom of my page, and causing strange errors.

Asked by ohmErnie in Programming for ASP.NET, Hypertext Markup Language (HTML), Visual Studio

I haven't seen this happen before. My first issues is when the app loads I have a table that has two textboxes and a button that is getting placed all the way on the left, when there should be some space in front of it. This can be seen in the step 1 image. When I go ahead and select my value from the list, the table has now duplicated itself underneath my grid, but the original table now has the correct position. This can be seen in step 2. I can get rid of the duplicate table by entering data into it and posting back, but the validation requires the original textbox to have a value as well. This can be seen in step 3. Once i make the postback, the duplicate goes away, but both values get placed in the original textbox and a comma is added in there as well. Also the grid and table are now too far left as the table originally was. This can be seen in step 4.

In addition, anytime I postback with my grid, a comma is appended in each box in my table, whether a value exists or not. What is going on here?

I have posted my aspx code, but left out the gridview to save space. Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="worksheet.aspx.cs" Inherits="worksheet" EnableSessionState="True" %>
<%@ Register Src="header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>OHM - Revenue Projection</title>   
    <link href="_css/revenue.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
        function show_wait()
        {
            var img;
            img = document.getElementById("img_load");
            img.style.visibility = 'visible';   
        }
    </script>
    <link href="m2css/h_bonus.css" rel="stylesheet" type="text/css" />
</head>
<body style="margin-top: 0px; margin-left: 0px">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <uc1:header ID="Header1" runat="server" />
        <asp:Panel ID="Panel1" runat="server" Height="25px" Width="125px">
        </asp:Panel>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    &nbsp; &nbsp; &nbsp;
                </td>
                <td>
        <asp:Label ID="lbl_thousands" runat="server" CssClass="normal_text" Font-Italic="True" ForeColor="Black"
            Text="*All values must be entered in thousands of dollars."></asp:Label>
                    <br />
                    <asp:Label ID="lbl_cutoff" runat="server" ForeColor="#C00000" CssClass="normal_text" Font-Italic="true"></asp:Label><br />
                    &nbsp;</td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                </td>
                <td>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" Visible="true">
            <ContentTemplate>
                <% if (ddl_clients.SelectedValue != "0")
                   {
                       load_state();
                       load_q();
                   }
                %>
                    <asp:DropDownList ID="ddl_clients" runat="server" Width="456px" DataSourceID="SqlDataSource2" DataTextField="new_client" DataValueField="cli_id">
                    </asp:DropDownList>
                    <asp:Button ID="cmd_pick" runat="server" CssClass="button_body" Text="Select Client >>" OnClick="cmd_pick_Click" /></td>
 
                &nbsp;&nbsp;<br />
                <br />
                <table cellpadding="0" cellspacing="1" class="normal_text" width="100%">
                    <tr>
                        <td align="left" style="width: 120px">
                            <asp:Label ID="lbl_add" runat="server" Font-Bold="True" Text="Add Project..."></asp:Label></td>
                        <td align="left" style="width: 600px">
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 120px">
                            &nbsp;</td>
                        <td align="left" style="width: 600px">
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 120px">
                            <asp:Label ID="lbl_project_name" runat="server" Text="Project Name:"></asp:Label></td>
                        <td align="left" style="width: 600px">
                            <asp:TextBox ID="txt_project_name" runat="server" MaxLength="100" Width="350px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="val_proj_name" runat="server" ControlToValidate="txt_project_name"
                                ErrorMessage="Project name is required!" ValidationGroup="val"></asp:RequiredFieldValidator></td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lbl_project_number" runat="server" Text="Project Number:"></asp:Label></td>
                        <td align="left" style="width: 465px">
                            <asp:TextBox ID="txt_project_number" runat="server" MaxLength="10" Width="100px"></asp:TextBox>
                            (optional) &nbsp;
                            <asp:Button ID="cmd_add" runat="server" CssClass="button_body" OnClick="cmd_add_Click"
                                Text="Add Project" ValidationGroup="val" /></td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                        </td>
                        <td align="left" colspan="2">
                            <asp:Label ID="lbl_confirm_add" runat="server" ForeColor="Red" Visible="False"></asp:Label></td>
                    </tr>
                </table>
                <br />
                <asp:Button ID="cmd_save" runat="server" CssClass="button_body" Text="Save Estimates" OnClick="cmd_save_Click" />&nbsp;
                <asp:Image ID="img_load" runat="server" ImageUrl="~/_images/bar-loader.gif" /><br />
               
                 <asp:GridView ID="grid_rev" runat="server" AutoGenerateColumns="False" CellPadding="0"
                     DataSourceID="SqlDataSource3" DataKeyNames="PRO_ID" ShowFooter="True" GridLines="None" CssClass="normal_text"  >
                 
              // GRIDVIEW CODE OMITTED TO SAVE SPACE
 
                </asp:GridView>
 
                <asp:Label ID="muni_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="trans_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="ewrg_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="surv_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="tsg_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="con_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="arc_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hou_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="lan_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hamp_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="subs_hidden" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="lbl_saved" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q0" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q1" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q2" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q3" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q4" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q5" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q1_cut" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="hide_q2_cut" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="all_hidden" runat="server" Visible="False"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT "PRO_ID", "PRO_NAME", "PRO_NUMBER" FROM "PROJECTS" WHERE ("PRO_CLI_ID" = :CLI_ID) ORDER BY "PRO_ID" DESC'>
            <SelectParameters>
                <asp:ControlParameter ControlID="ddl_clients" Name="CLI_ID" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
   
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT "PRO_ID", "PRO_NAME" , "PRO_NUMBER" FROM "PROJECTS"'>
        </asp:SqlDataSource>
                </td>
                <td style="width: 100px">
                </td>
            </tr>
        </table>
 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT distinct &quot;CLI_ID&quot;, &quot;CLI_NAME&quot; FROM &quot;CLIENTS&quot;, &quot;PROJECTS&quot; WHERE &quot;CLI_ID&quot; = &quot;PRO_CLI_ID&quot;">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT CLIENTS.CLI_ID, CLIENTS.CLI_NAME, CLIENTS.CLI_CODE, CLIENTS.CLI_OWNER, COUNT(PROJECTS.PRO_ID) AS EXPR1, '(' || CLIENTS.CLI_CODE || ') ' || CLIENTS.CLI_NAME AS NEW_CLIENT FROM CLIENTS INNER JOIN PROJECTS ON CLIENTS.CLI_ID = PROJECTS.PRO_CLI_ID GROUP BY CLIENTS.CLI_ID, CLIENTS.CLI_NAME, CLIENTS.CLI_CODE, '(' || CLIENTS.CLI_CODE || ') ' || CLIENTS.CLI_NAME, CLIENTS.CLI_OWNER ORDER BY CLIENTS.CLI_NAME">
        </asp:SqlDataSource>
                 
    </form>
</body>
</html>
Attachments:
 
This is when the app loads. The table should not be that far left, only as far as the dropdown.
This is when the app loads. The table should not be that far left, only as far as the dropdown.
 
 
When I select a client, now the table has duplicated itself underneath my grid, but the top one now has correct position.
When I select a client, now the table has duplicated itself underneath my grid, but the top one now has correct position.
 
 
If I try to use the duplicate boxes, the validation doesn't work
If I try to use the duplicate boxes, the validation doesn't work
 
 
Duplicate is gone, but have two values in one box. Also the grid is shifted left.
Duplicate is gone, but have two values in one box. Also the grid is shifted left.
 
 
Loading Advertisement...
 
[+][-]06.26.2008 at 08:48AM PDT, ID: 21875960

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 10:57AM PDT, ID: 21877315

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:09AM PDT, ID: 21877407

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:44AM PDT, ID: 21877784

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:46AM PDT, ID: 21877807

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:53AM PDT, ID: 21877881

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:56AM PDT, ID: 21877905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 12:01PM PDT, ID: 21877951

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 12:17PM PDT, ID: 21878077

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 12:58PM PDT, ID: 21878437

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 07:03AM PDT, ID: 21883828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 09:09AM PDT, ID: 21885192

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 11:26AM PDT, ID: 21886457

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Hypertext Markup Language (HTML), Visual Studio
Sign Up Now!
Solution Provided By: ohmErnie
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.27.2008 at 02:14PM PDT, ID: 21887719

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628