We help IT Professionals succeed at work.
Get Started

Page controls not reacting to click events

jknj72
jknj72 asked
on
212 Views
Last Modified: 2017-04-12
I have a form, pic attached, and I was able to click on a Status link and rit would refresh the grid. Also the buttons below the grid would cause a ModalPopup to show. Now, and Im not sure what I did to stop this from working, none of the functionality works and I think it may be in the markup because that it what I was playing around with. I have attached a pic and the markup. If you want the server side code just ask...
Thank you for any help...
 

    <div id="divPanel" runat="server" >

        <asp:Panel ID="pnlQuickView" runat="server">

            <div style="height: 25px; font-size: x-large; width: 100%;text-align:center;">
                <b>
                    <asp:Label ID="lblManagement" runat="server" Text=""></asp:Label>                       
                </b>
            </div>
            <br />
            <%--Quick View of Status for logged in user--%>
            <table align="center" style="width: 50%">
                <tr >                            
                    <td><h4>Quick View:</h4></td>                                                             
                </tr>
                <tr style="text-align: center;border: 1px solid #0066CC">                            
                    <td id="tdCreated" runat="server" style="font-size:18px;" class="auto-style7"><asp:Label ID="lblCreated" runat="server" Text="Created"></asp:Label><br/><asp:Image ID="Image5" runat="server" ImageUrl="~/images/report.png"/><br/><asp:LinkButton ID="lnkCreated" runat="server" Text="0" Font-Size="Large" OnClick="lnkCreated_Click" CommandArgument="1"></asp:LinkButton></td>
                    <td id="tdPending" runat="server" style="font-size:18px;" class="auto-style7"><asp:Label ID="lblPending" runat="server" Text="Pending"></asp:Label><br/><asp:Image ID="Image2" runat="server" ImageUrl="~/images/hourglass.png"/><br/><asp:LinkButton ID="lnkPending" runat="server" Text="0" Font-Size="Large" OnClick="lnkPending_Click" CommandArgument="2"></asp:LinkButton></td>
                    <td id="tdApproved" runat="server" style="font-size:18px;" class="auto-style7"><asp:Label ID="lblApproved" runat="server" Text="Approved"></asp:Label><br/><asp:Image ID="Image3" runat="server" ImageUrl="~/images/award_star_gold_2.png"/><br/><asp:LinkButton ID="lnkApproved" runat="server" Text="0" Font-Size="Large" OnClick="lnkApproved_Click" CommandArgument="3"></asp:LinkButton></td>
                    <td id="tdRejected" runat="server" style="font-size:18px;" class="auto-style7"><asp:Label ID="lblRejected" runat="server" Text="Rejected"></asp:Label><br/><asp:Image ID="Image4" runat="server" ImageUrl="~/images/report_delete.png"/><br/><asp:LinkButton ID="lnkRejected" runat="server" Text="0" Font-Size="Large" OnClick="lnkRejected_Click" CommandArgument="4"></asp:LinkButton></td>

                </tr>

            </table>
            <br />

        </asp:Panel>

        <asp:Panel ID="pnlSearch" runat="server" DefaultButton="btnSearch">  <%--HorizontalAlign="Center" Width="100%" Direction="LeftToRight" ScrollBars="Horizontal"--%>
                <table align="center">   <%-- style="width:100%"--%>
                    <tr Style="text-align: left;" >
                        <td>
                            <asp:Label ID="lblDateFrom" runat="server" Text="From: " Height="16px" Width="80px" ></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblDateTo" runat="server" text="To:"></asp:Label>
                        </td>
                        <td></td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Text="Employees: " Height="16px" Width="80px"></asp:Label>
                        </td>
                        <td></td>
                        <td>
                            <asp:Label ID="Label5" runat="server" text="Roles:"></asp:Label>
                        </td>
                    </tr>                                             
                    <tr>
                        <td style="width:200px;"> 
                            <asp:Imagebutton ID="imgClearFrom" runat="server" ImageAlign="Top" ImageUrl="~/images/clearButtonIconDark.png" OnClick="imgClearFrom_Click" />                     
                            <asp:TextBox ID="txtDateFrom" Style="width: 128px; height: 22px;" runat="server" MaxLength="10" OnTextChanged="txtDateFrom_TextChanged"></asp:TextBox>
                            <asp:ImageButton ID="imgCalendar" runat="server" CausesValidation="false" Style="height: 26px;" ImageUrl="~\Images\Calendar.png" Width="25" ImageAlign="Top" />
                            <cc1:calendarextender ID="calDateFrom" runat="server" Format="MM/dd/yyyy" PopupButtonID="imgCalendar" PopupPosition="Right" TargetControlID="txtDateFrom" />
                        </td>

                        <td style="width:200px;">
                            <asp:ImageButton ID="imgClearTo" runat="server" ImageAlign="Top" ImageUrl="~/images/clearButtonIconDark.png" OnClick="imgClearTo_Click" />
                            <asp:TextBox ID="txtDateTo" runat="server" AutoPostBack="True" Style="width: 128px; height: 22px;" MaxLength="10" OnTextChanged="txtDateTo_TextChanged" OnInit="TextInit"></asp:TextBox>
                            <asp:ImageButton ID="imgCalendar1" runat="server" CausesValidation="false" Style="height: 26px;" ImageUrl="~\Images\Calendar.png" Width="25" ImageAlign="Top"/>
                            <cc1:calendarextender ID="calDateTo" runat="server" Format="MM/dd/yyyy" PopupButtonID="imgCalendar1" PopupPosition="Right" TargetControlID="txtDateTo" />
                        </td>

                        <td width="20px">
                        </td>
              
                        <td align="left" style="width:220px;">
                            <asp:DropDownList ID="ddlUsers" runat="server" OnSelectedIndexChanged="dlUsers_SelectedIndexChanged" AppendDataBoundItems="true" Width="200px" AutoPostBack="true" DataSourceID="SqlDataSource5" DataTextField="Name" DataValueField="UserID">
                            </asp:DropDownList>
                            <asp:SqlDataSource runat="server" ID="SqlDataSource5" ConnectionString='<%$ ConnectionStrings:constr %>' SelectCommand="spGetInspectorAuditors">
                            </asp:SqlDataSource>
                        </td>

                        <td width="20px">
                        </td>

                        <td align="left" style="width:220px;">                            
                            <asp:DropDownList ID="ddlSecondary" runat="server" OnSelectedIndexChanged="ddlSecondary_SelectedIndexChanged" AppendDataBoundItems="true" Width="200px" AutoPostBack="true" DataSourceID="SqlDataSource4" DataTextField="RoleDescription" DataValueField="UserRoleID" CssClass="chosen">                                
                            </asp:DropDownList>                                           
                        </td>
                        <td align="left" style="width: auto; float: left;" >
                            <asp:Button ID="btnSearch" runat="server" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Height="30px" OnClick="btnSearch_Click" Text="Search"/>
                        </td>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource4" ConnectionString='<%$ ConnectionStrings:constr %>' SelectCommand="spGetManagementUserRoles" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter DefaultValue="3" Name="role" SessionField="UserRoleID" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        
                    </tr>           
                </table>  
                
                <br />

                <div id="divSecondary" runat="server" style="font-size:small; width: 100%;text-align:center;">
                    <b>                                                  
                        <br />    
                        <asp:Label ID="lblSecondary" runat="server" Text=""></asp:Label>   
                    </b>                     
                    <table id="tblSecondary" runat="server" align="center" style="width: 50%;border: .2em none #0066CC;">                        
                        <tr style="text-align: center">
                            <%--<td id="td1" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label2" runat="server" Text="Created"></asp:Label><br/><br/><asp:Image ID="Image5" runat="server" ImageUrl="~/images/report.png"/><br/><asp:LinkButton ID="LinkButton1" runat="server" Text="0" Font-Size="Small" OnClick="lnkCreated_Click" CommandArgument="1"></asp:LinkButton></td>--%>
                            <td id="tdPending1" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label3" runat="server" Text="ED. Pending"></asp:Label><br/><asp:LinkButton ID="lnkPending1" runat="server" Text="0" Font-Size="Small" OnClick="lnkPending1_Click" CommandArgument="5"></asp:LinkButton></td>
                            <td id="tdApproved1" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label4" runat="server" Text="ED. Approved"></asp:Label><br/><asp:LinkButton ID="lnkApproved1" runat="server" Text="0" Font-Size="Small" OnClick="lnkApproved1_Click" CommandArgument="6"></asp:LinkButton></td>
                            <td id="tdRejected1" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label6" runat="server" Text="ED. Rejected"></asp:Label><br/><asp:LinkButton ID="lnkRejected1" runat="server" Text="0" Font-Size="Small" OnClick="lnkRejected1_Click" CommandArgument="7"></asp:LinkButton></td> <td style="width:10px;"></td>
                            <td id="tdPending2" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label2" runat="server" Text="Fin. Pending"></asp:Label><br/><asp:LinkButton ID="lnkPending2" runat="server" Text="0" Font-Size="Small" OnClick="lnkPending2_Click" CommandArgument="8"></asp:LinkButton></td>
                            <td id="tdApproved2" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label10" runat="server" Text="Fin. Approved"></asp:Label><br/><asp:LinkButton ID="lnkApproved2" runat="server" Text="0" Font-Size="Small" OnClick="lnkApproved2_Click" CommandArgument="9"></asp:LinkButton></td>
                            <td id="tdRejected2" runat="server" style="font-size:9px;" class="auto-style7"><asp:Label ID="Label11" runat="server" Text="Fin. Rejected"></asp:Label><br/><asp:LinkButton ID="lnkRejected2" runat="server" Text="0" Font-Size="Small" OnClick="lnkRejected2_Click" CommandArgument="10"></asp:LinkButton></td>
                        </tr>
                    </table> 
                                                      
                    <br />
                </div>                                                               
            </asp:Panel>
     
    </div>
    
    <br />

    <div id="divGridview" align="center" >
<%--    <asp:UpdatePanel ID="upGridview" runat="server" UpdateMode="Conditional">
        <ContentTemplate>--%>
        <fieldset style="text-align: left;width:95%">
            <legend>Status: <asp:Label ID="lblGridviewStatus" runat="server" Text=""></asp:Label></legend><br />
                                    
            <table align="center" width="100%" >
                <tr align="center" >
                    <td align="center" >   
                        <asp:GridView ID="myGridview" runat="server" OnRowDataBound="myGridview_RowDataBound" OnRowCommand="myGridview_RowCommand" OnSelectedIndexChanged="myGridview_SelectedIndexChanged" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found" 
                                AutoGenerateColumns="False" HorizontalAlign="Center" Width="90%" HeaderStyle-BackColor="#7092BE" HeaderStyle-ForeColor="White"> <%--OnSorting="myGridview_Sorting"  AllowSorting="True" AllowPaging="True" ViewStateMode="Enabled" --%>                                    
                            <Columns>
                                <asp:BoundField DataField="UserID" HeaderText="Employee" ReadOnly="True" /> 
                                <asp:BoundField DataField="User" HeaderText="Employee" ReadOnly="True" SortExpression="User" /> 
                                <asp:BoundField DataField="StatusID" HeaderText="Status" SortExpression="StatusID" />
                                <asp:BoundField DataField="WorkWeekID" HeaderText="Week ID" SortExpression="WorkWeekID" />
                                <asp:BoundField DataField="WeekRange" HeaderText="Week Range" ReadOnly="True" SortExpression="WeekRange" />
                                <asp:BoundField DataField="WorkCount" HeaderText="Work Items" ReadOnly="True" SortExpression="WorkCount" />
                                <asp:BoundField DataField="TravelCount" HeaderText="Travel Items" ReadOnly="True" SortExpression="TravelCount" />
                                <asp:BoundField DataField="ImageCount" HeaderText="Image Items" ReadOnly="True" SortExpression="ImageCount" />                                        
                                <asp:BoundField DataField="Duration" HeaderText="Duration" ReadOnly="True" SortExpression="Duration" />
                                <asp:BoundField DataField="ItemApprovedBy" HeaderText="Approved By" SortExpression="ItemApprovedBy" DataFormatString="{0:dd-MMM-yyyy}"/>
                                <asp:BoundField DataField="ItemApprovedDate" HeaderText="Approved Date" SortExpression="ItemApprovedDate"  />
                            
                                <asp:TemplateField HeaderText="Approve" SortExpression="Approve">
                                    <HeaderTemplate>                                                
                                        <asp:Label ID="lblHeader" runat="server" Text='<%# IIf(Session("StatusID") = 3, "Approved", "Approve")%>' ></asp:Label>
                                        <asp:ImageButton ID="imgApproveHeader" runat="server" OnClick="imgApproveHeader_Click" ImageUrl="~/images/award_star_gold_2.png" ImageAlign="TextTop" /> <%--ImageUrl="~/images/checkbox.png"--%>
                                    </HeaderTemplate> 
                                 
                                    <ItemTemplate> 
                                        <%--<asp:Checkbox ID="chkApprove" runat="server" Visible='<%# IIf(Session("StatusID") = 2, "True", "False")%>' ></asp:Checkbox> OnClick="imgApprove_Click"--%> 
                                        <asp:ImageButton ID="imgApprove" runat="server" ImageUrl='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 6), "~/images/checkbox.png", "~/images/checkbox_no.png")%>' ImageAlign="AbsMiddle" CommandName="Approve" />
                                    </ItemTemplate>                                                        
                                </asp:TemplateField> 
                                                                                   
                                <asp:TemplateField HeaderText="Email" SortExpression="Email" >
                                    <HeaderTemplate>                                        
                                        <asp:Label ID="lblEmailHeader" runat="server" Text="Email" Visible='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 6 Or Session("StatusID") = 9), "True", "False")%>'></asp:Label>                                    
                                        <asp:ImageButton ID="imgEmailHeader" runat="server" OnClick="imgEmailHeader_Click" ImageUrl="~/images/sent.png" Visible='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 6 Or Session("StatusID") = 9), "True", "False")%>' ImageAlign="TextTop" CommandName="EmailHeader" /> <%--ImageUrl="~/images/checkbox.png"--%>                                    
                                    </HeaderTemplate> 

                                    <ItemTemplate>
                                        <%--<asp:Checkbox ID="chkEmail" runat="server" Visible='<%# IIf(Session("StatusID") = 3, "True", "False")%>'></asp:Checkbox>--%>
                                        <asp:ImageButton ID="imgEmail" runat="server" ImageUrl= "~/images/checkbox_no.png" ImageAlign="AbsMiddle" Visible='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 6 Or Session("StatusID") = 9), "True", "False")%>' CommandName="Email" CommandArgument="<%# CType(Container, GridViewRow).RowIndex%>" />
                                    </ItemTemplate>                                                        
                                </asp:TemplateField> 
                                            
                                <asp:BoundField DataField="WorkWeekKey" ReadOnly="true" ShowHeader="False" Visible="false" />  
                                                                                               
                                <asp:TemplateField HeaderText="Comments" SortExpression="Comments">
                                    <HeaderTemplate>                                        
                                        <asp:Label ID="lblCommentHeader" runat="server" Text="Comments" Visible='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 4 Or Session("StatusID") = 7 Or Session("StatusID") = 10), "True", "False")%>'></asp:Label>                                                                                    
                                    </HeaderTemplate> 

                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgComments" runat="server" ImageUrl= "~/images/comments.png" ImageAlign="AbsMiddle" Visible='<%# IIf((Session("StatusID") = 3 Or Session("StatusID") = 4 Or Session("StatusID") = 7 Or Session("StatusID") = 10), "True", "False")%>' CommandName="Comments" CommandArgument="<%# CType(Container, GridViewRow).RowIndex%>" OnClick="imgComments_Click" />
                                    </ItemTemplate>                                                        
                                </asp:TemplateField> 

                            </Columns>

                            <EmptyDataRowStyle Font-Bold="True" HorizontalAlign="Center" />
                            <EmptyDataTemplate> <center>No Records Found</center> </EmptyDataTemplate>
                            <HeaderStyle BackColor="#7092BE" ForeColor="White" />
                            <RowStyle HorizontalAlign="Center" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <br />

            <div id="divEmail" runat="server" style="float: right;padding-right:80px;">
                <asp:Button ID="btnBatchEmail" runat="server" CommandArgument="" CommandName="emailbatch" Text="Email Approved" OnClick="btnBatchEmail_Click" Height="30px" Width="200px" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Visible="False" ></asp:Button>
                <cc1:RoundedCornersExtender runat="server" BehaviorID="btnBatchEmail_RoundedCornersExtender" TargetControlID="btnBatchEmail" ID="btnBatchEmail_RoundedCornersExtender"></cc1:RoundedCornersExtender> &nbsp 

                <asp:Button ID="btnApproveWeek" runat="server" Text="Approve Timesheet(s)" OnClick="btnApproveWeek_Click" BackColor="#46A3FF" Height="30px" Width="200px" CssClass="" Font-Bold="True" ForeColor="White" Font-Size="Medium" Visible="False" /> 
                <%--<cc1:ConfirmButtonExtender ID="btnApproveWeek_ConfirmButtonExtender" runat="server" BehaviorID="btnApproveWeek_ConfirmButtonExtender" ConfirmText="Approve Timesheet? Would you like to proceed?" TargetControlID="btnApproveWeek" />--%>
                <cc1:RoundedCornersExtender ID="btnApproveWeek_RoundedCornersExtender" runat="server" BehaviorID="btnApproveWeek_RoundedCornersExtender" TargetControlID="btnApproveWeek" >
                </cc1:RoundedCornersExtender> &nbsp                    

                <asp:Button ID="btnRejectWeek" runat="server" Text="Reject Timesheet" OnClick="btnRejectWeek_Click" BackColor="#46A3FF" Height="30px" Width="180px" CssClass="" Font-Bold="True" ForeColor="White" Font-Size="Medium" Visible="False" /> 
                <%--<cc1:ConfirmButtonExtender ID="btnRejectWeek_ConfirmButtonExtender" runat="server" BehaviorID="btnRejectWeek_ConfirmButtonExtender" ConfirmText="Reject Timesheet? Please add comments describing why." TargetControlID="btnRejectWeek" />--%>
                <cc1:RoundedCornersExtender ID="btnRejectWeek_RoundedCornersExtender" runat="server" BehaviorID="btnRejectWeek_RoundedCornersExtender" TargetControlID="btnRejectWeek" />&nbsp 

                <asp:Button ID="btnResubmit" runat="server" Text="Re-Submit Timesheet" OnClick="btnResubmit_Click" BackColor="#46A3FF" Height="30px" Width="180px" CssClass="" Font-Bold="True" ForeColor="White" Font-Size="Medium" Visible="False" />
                <cc1:RoundedCornersExtender runat="server" BehaviorID="btnResubmit_RoundedCornersExtender" TargetControlID="btnResubmit" ID="btnResubmit_RoundedCornersExtender"></cc1:RoundedCornersExtender>
            </div>                   
        </fieldset>                            
        
        <%--New Popup Control for Comments--%>    
        <cc1:ModalPopupExtender ID="PopupModal" runat="server" TargetControlID="HiddenField1" CancelControlID="btnCancel" PopupControlID="pnlComments" Drag="true" PopupDragHandleControlID="pnlComments" BackgroundCssClass="popup-background-loading" >
        </cc1:ModalPopupExtender>

        <asp:HiddenField ID="HiddenField1" runat="server" Value="0" />
        <asp:Panel ID="pnlComments" runat="server" Width="370px">
            <table style="border:3px Solid #7092BE; background-color:white;">
                <tr style="background-color:#7092BE;padding:5px;height:30px;">
                    <td colspan="2" style="color:White; font-weight:bold; font-size:large;" align="center">Timesheet Comments</td>
                </tr>

                <tr style="padding:5px;padding-top:10px;width:85px">
                    <td align="right" style=" font-weight:bold" >
                        <br />
                        Week ID:
                    </td>
                    <td style="padding-left:20px" >
                        <br />
                        <asp:Label ID="lblWeekID" Font-Bold="true" runat="server" ReadOnly="true"></asp:Label>
                    </td>
                </tr>    
                                                                           
                <tr id="trLastUpdate" runat="server" style="padding:5px;vertical-align:central;">
                    <td align="right" style="font-weight:bold"><br />Last Updated: 

                    </td>
                    <td style="vertical-align:central;padding-left:20px;"><br />
                        <asp:Label ID="lblPriorRejections" runat="server" Font-Bold="true" Text=""></asp:Label>
                    </td>
                </tr>

                <tr style="padding:5px;padding-top:10px;vertical-align:top;">
                    <td align="right" style="font-weight:bold" >
                        <br />
                        Comments: </td>
                    <td style="padding-left:10px;padding-right:5px;">
                        <br />
                        <asp:TextBox ID="txtCommentItem" runat="server" Height="120px" Text="" TextMode="MultiLine" Width="240px" />
                        <asp:RequiredFieldValidator ID="CommentRequired" runat="server" SetFocusOnError="true" ControlToValidate="txtCommentItem" ErrorMessage="<br />* Comments field is required." ForeColor="Red" ToolTip="Comments field is required." Font-Bold="True" style="text-align:left;"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px;font-weight:bold" >                                    
                        Created By:
                        <br />
                    </td>
                    <td style="padding:5px;padding-left:10px;">
                        <br />
                        <asp:DropDownList ID="ddlRejectedBy" runat="server" DataSourceID="SqlDataSource6" DataTextField="Manager" DataValueField="UserID" Width="220px">
                            <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="spFillManagementDropdown" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="UserRoleID" SessionField="UserRoleID" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <br />
                        <asp:Label ID="lblValidator" runat="server" ForeColor="Red" Font-Bold="true" Text="* Created By field is required."></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td align="center">
                        <asp:Button ID="btnOkTest" runat="server" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Height="30px" OnClick="btnOkTest_Click" Text="Ok" Width="100px" />
                        &nbsp;
                        <cc1:RoundedCornersExtender ID="btnOkTest_RoundedCornersExtender" runat="server" BehaviorID="btnOkTest_RoundedCornersExtender" TargetControlID="btnOkTest" />

                        <asp:Button ID="btnCancel" runat="server" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Height="30px" OnClick="btnCancel_Click" Text="Cancel" Width="100px" />
                        <cc1:RoundedCornersExtender ID="btnCancel_RoundedCornersExtender" runat="server" BehaviorID="btnCancel_RoundedCornersExtender" TargetControlID="btnCancel" />
                    </td>
                </tr>
                                                
            </table>
        </asp:Panel>

        <%--New Popup Control for Comments History--%>    
        <cc1:ModalPopupExtender ID="PopupModalCommentGrid" runat="server"  TargetControlID="HiddenField3" CancelControlID="btnCloseCmments" PopupControlID="Panel1" Drag="true" PopupDragHandleControlID="Panel1" BackgroundCssClass="popup-background" >
        </cc1:ModalPopupExtender>
                
        <asp:HiddenField ID="HiddenField3" runat="server" Value="0" />
        <asp:Panel ID="Panel1" runat="server" style="display:block;width:50%;">   <%-- BorderColor="Black" BorderStyle="Solid" BorderWidth="1" style="display:block;width:60%;" HorizontalAlign="Center"               --%>
            <table style="font-family:Tahoma;border:3px Solid #7092BE; width:100%; height:100%; background-color:white;"> 
                <tr style="width:100%;font-family:Tahoma;padding:2px;background-color:#7092BE;height:30px; font-size: medium; color: #FFFFFF;text-align:center;border:solid;border-color:black;">
                    <td>
                        <b>Comments History</b>
                    </td>
                </tr>
                <tr style="font-family:Tahoma;padding:2px;border:3px Solid #7092BE; width:100%; height:100%; background-color:white;">
                    <td>
                        <asp:GridView ID="gvComments" runat="server" OnRowDataBound="gvComments_RowDataBound" OnSelectedIndexChanged="gvComments_SelectedIndexChanged" GridLines="None" 
                            ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" HorizontalAlign="Center" Width="100%" DataSourceID="SqlDataSource7" DataKeyNames="ItemCommentID" 
                            ItemStyle-HorizontalAlign="Center" RowStyle-HorizontalAlign="Center" EmptyDataText="<br /> No Records Found <br />" 
                            EmptyDataRowStyle-HorizontalAlign="Center" HeaderStyle-BackColor="#7092BE" HeaderStyle-ForeColor="White" BorderColor="Black" HeaderStyle-BorderColor="Black" >
                            <Columns>
                                <asp:BoundField DataField="ItemCommentID" HeaderText="ItemCommentID" SortExpression="ItemCommentID" ReadOnly="True" Visible="False" />
                                <asp:BoundField DataField="WorkWeekID" HeaderText="WorkWeekID" SortExpression="WorkWeekID" Visible="False" />
                                <asp:BoundField DataField="WeekID" HeaderText="WeekID" SortExpression="WeekID" Visible="False" />
                                <asp:BoundField DataField="UserID" HeaderText="UserID" SortExpression="UserID" Visible="False" />
                                <asp:BoundField DataField="Comments" HeaderText="Comments" SortExpression="Comments" ItemStyle-Wrap="true" >
                                <ItemStyle Wrap="True" />
                                </asp:BoundField>
                                <asp:BoundField DataField="RejectedBy" HeaderText="Rejected By" SortExpression="RejectedBy" />
                                <asp:BoundField DataField="CreateDate" HeaderText="Reject Date" SortExpression="CreateDate" />
                                <asp:TemplateField>
                                    <HeaderTemplate>                                                
                                        <asp:Label ID="lblHeader" runat="server" Text="Comment Type" ></asp:Label>                                                
                                    </HeaderTemplate>                                  
                                    <ItemTemplate> 
                                        <asp:Image ID="imgType" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/images/award_star_gold_2.png" /> <%-- ImageUrl="~/images/award_star_gold_2.png" ImageAlign="AbsMiddle" CommandName="Approve" />--%>
                                    </ItemTemplate>                                                        
                                </asp:TemplateField> 
                                <asp:BoundField DataField="IsApproved" Visible="false" ReadOnly="true"/>
                            </Columns>
                            <SelectedRowStyle BackColor="LightYellow" />
                            <EmptyDataRowStyle Font-Bold="True" HorizontalAlign="Center" />
                            <RowStyle HorizontalAlign="Center" />
                        </asp:GridView>
                                
                        <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT [ItemCommentID], [WorkWeekID], [WeekID], [UserID], [Comments], [RejectedBy], [CreateDate], [IsApproved] FROM [ItemComments] WHERE (([WorkWeekID] = @WorkWeekID) AND ([WeekID] = @WeekID)) Order By CreateDate desc">
                            <SelectParameters>
                                <asp:SessionParameter Name="WorkWeekID" SessionField="WeekKey" Type="Int32" />
                                <asp:SessionParameter Name="WeekID" SessionField="AdminWeekID" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>                               
                    </td>
                </tr> 
                <tr style="background-color:white;" align="right">                                          
                    <td>
                        <asp:Button ID="btnAddComment" runat="server" Text="Add Comment"  OnClick="btnAddComment_Click" BackColor="#46A3FF" Height="30px" Width="180px" Font-Bold="True" ForeColor="White" Font-Size="Medium" />                                        
                        <cc1:RoundedCornersExtender ID="btnAddComment_RoundedCornersExtender" runat="server" BehaviorID="btnAddComment_RoundedCornersExtender" TargetControlID="btnAddComment" />                                
                        &nbsp;&nbsp;&nbsp;

                        <asp:Button ID="btnCloseCmments" runat="server" Text="Close" BackColor="#46A3FF" Height="30px" Width="160px" Font-Bold="True" ForeColor="White" Font-Size="Medium" />                                                               
                        <cc1:RoundedCornersExtender ID="btnCloseCmments_RoundedCornersExtender" runat="server" BehaviorID="btnCloseCmments_RoundedCornersExtender" TargetControlID="btnCloseCmments" />
                        &nbsp;&nbsp;                                                               
                    </td>
                </tr>
            </table>           
        </asp:Panel>
                                    
        <%--New Popup Control for Approving Timesheets--%>
        <cc1:ModalPopupExtender ID="PopupApproveTimesheets" runat="server" TargetControlID="HiddenField2" PopupControlID="pnlApprove" Drag="true" PopupDragHandleControlID="pnlApprove" CancelControlID="btnBatchCancel" BackgroundCssClass="popup-background" >  
        </cc1:ModalPopupExtender>

        <asp:HiddenField ID="HiddenField2" runat="server" />
        <asp:Panel ID="pnlApprove" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1" Width="350px" Height="220px" style="display:block">
            <table style="border:3px Solid #7092BE; width:100%; height:100%;background-color:white;">        
                <tr style="background-color:#7092BE; width:100%;vertical-align:central;">
                    <td colspan="2" style="color:White; font-weight:bold; font-size:larger;height:30px;" align="center" >Approve Timesheets</td>
                </tr>                                                        
                <tr>
                    <td align="center" style="font-weight:bold;"><br />
                        Week ID: </td>
                    <td style="padding-left: 10px;" ><br />
                        <asp:Label ID="lblWeeks" runat="server" Font-Bold="true" Text=""></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align:middle;">
                    <td align="center" style="font-weight:bold;height:30px">Signature: </td>
                    <td style="padding-left: 10px;" >
                        <asp:TextBox ID="txtSignature" runat="server" Text="" Width="180px" />
                        &nbsp;&nbsp;<asp:ImageButton ID="imgCommentApprove" runat="server" ImageUrl="~/images/flyout.png" ToolTip="Leave Comments" OnClientClick="DisplayComments(); return false;" />
                    </td>
                </tr>
                            
                <tr id="trComments" style="vertical-align: top;height:140px;display:none;">
                    <td align="center" style="font-weight:bold;">
                        Comments: </td>
                    <td style="padding-left:10px;padding-right:5px;" >
                        <asp:TextBox ID="txtCommentsApprove" runat="server" Height="100px" Text="" TextMode="MultiLine" Width="240px" />
                    </td>
                </tr>

                <tr>
                    <td></td>
                    <td align="center">
                        <asp:Button ID="btnBatchApprove" runat="server" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Height="30px" OnClick="btnBatchApprove_Click" Text="Ok" Width="100px" />
                        <cc1:RoundedCornersExtender ID="btnBatchApprove_RoundedCornersExtender" runat="server" BehaviorID="btnBatchApprove_RoundedCornersExtender" TargetControlID="btnBatchApprove" />
                        &nbsp;&nbsp;
                        <asp:Button ID="btnBatchCancel" runat="server" BackColor="#46A3FF" Font-Bold="True" Font-Size="Medium" ForeColor="White" Height="30px" OnClick="btnBatchCancel_Click" Text="Cancel" Width="100px" />
                        <cc1:RoundedCornersExtender ID="btnBatchCancel_RoundedCornersExtender" runat="server" BehaviorID="btnBatchCancel_RoundedCornersExtender" TargetControlID="btnBatchCancel" />
                    </td>
                </tr>
            </table>
        </asp:Panel>

        <%--</ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>

Open in new window

Web form pic
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE