Click here to Skip to main content
15,916,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir,
in my button click i checked the today date by using javascript.its working properly.but when iam using this button inside the tab panel onclientclick is not working.
if any one knows the answer please help me
bellow is my code
ASP.NET
<cc1:TabPanel ID="TabPanelmaster"  runat="server" HeaderText="Main Details">                    
                    <ContentTemplate>
                        <asp:Panel runat="server">
                         <table id="mastermain"  runat="server" width="100%">
                             <tr  runat="server">
                                 <td  runat="server" class="Label_bg">
                                     <asp:Label ID="lbltitle" runat="server" CssClass="Label_Normal_Bold" Text="Main"></asp:Label>
                                     <div class="sub_bar">
                                         <div class="sub_content">
                                             <asp:LinkButton ID="btnList" runat="server" CausesValidation="False" OnClick="btnList_Click1">List</asp:LinkButton>
                                         </div>
                                         <div class="list">
                                         </div>
                                         <div class="sub_content">
                                             <asp:LinkButton ID="btnAdd" runat="server" CausesValidation="False" OnClick="btnAdd_Click1">Add Employee |</asp:LinkButton>
                                         </div>
                                         <div class="add">
                            
                        </div>
                                     </div>
                                 </td>
                             </tr>
                          <tr  runat="server">
                              <td  runat="server">
                               

                                  <asp:Label ID="l" runat ="server" Text="Employee Details" ForeColor="Gray" onblur = "WaterMark(this, event);" onfocus = "WaterMark(this, event);" />

                              </td>
                          </tr>
                                  <tr  runat="server">
                       <td  runat="server">
                           <table id="pnlmaster"  runat="server" class="normal fancy">
                                <tr id="Tr17"  runat="server">
            <td id="Td52" colspan="4"  runat="server" >Employee Main Details</td>
        </tr> 
                               <tr id="Tr1"  runat="server">
                                   <td id="Td1"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label1" runat="server" Text="Employee Code"></asp:Label>
                                   </td>
                                   <td id="Td2"  runat="server" class="auto-style16"> </td>
                                   <td id="Td3"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtCode" runat="server" CssClass="TextBox_Normal" MaxLength="8"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCode" ErrorMessage="Code required" ForeColor="Red" ToolTip="Code required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td4"  runat="server"> </td>
                               </tr>
                               <tr id="Tr2"  runat="server">
                                   <td id="Td5"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label2" runat="server" Text="First Name"></asp:Label>
                                   </td>
                                   <td id="Td6"  runat="server" class="auto-style16"> </td>
                                   <td id="Td7"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtEmpFirstName" runat="server" CssClass="TextBox_Normal" MaxLength="50"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmpFirstName" ErrorMessage="Name Required" ForeColor="Red" ToolTip="Name Required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td8"  runat="server"> </td>
                               </tr>
                               <tr id="Tr3"  runat="server">
                                   <td id="Td9"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label3" runat="server" Text="Middle Name"></asp:Label>
                                   </td>
                                   <td id="Td10"  runat="server" class="auto-style16"> </td>
                                   <td id="Td11"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtEmpMiddleName" runat="server" CssClass="TextBox_Normal" MaxLength="300"></asp:TextBox>
                                   </td>
                                   <td id="Td12"  runat="server"> </td>
                               </tr>
                               <tr id="Tr4"  runat="server">
                                   <td id="Td13"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label4" runat="server" Text="Last Name"></asp:Label>
                                   </td>
                                   <td id="Td14"  runat="server" class="auto-style16"></td>
                                   <td id="Td15"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtEmpLatName" runat="server" CssClass="TextBox_Normal" MaxLength="50"></asp:TextBox>
                                   </td>
                                   <td id="Td16"  runat="server"></td>
                               </tr>
                               <tr id="Tr5"  runat="server">
                                   <td id="Td17"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label6" runat="server" Text="Designation"></asp:Label>
                                   </td>
                                   <td id="Td18"  runat="server" class="auto-style16"> </td>
                                   <td id="Td19"  runat="server" class="auto-style25">
                                       <asp:DropDownList ID="ddldesig" runat="server" CssClass="dropdown">
                                       </asp:DropDownList>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddldesig" ErrorMessage="Designation required" ForeColor="Red" InitialValue="0" ToolTip="Code required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td20"  runat="server"> </td>
                               </tr>
                               <tr id="Tr6"  runat="server">
                                   <td id="Td21"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label7" runat="server" Text="Department"></asp:Label>
                                   </td>
                                   <td id="Td22"  runat="server" class="auto-style16"> </td>
                                   <td id="Td23"  runat="server" class="auto-style25">
                                       <asp:DropDownList ID="ddldept" runat="server" CssClass="dropdown">
                                       </asp:DropDownList>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ddldept" ErrorMessage="Department required" ForeColor="Red" InitialValue="0" ToolTip="Department required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td24"  runat="server"> </td>
                               </tr>
                               <tr id="Tr7"  runat="server">
                                   <td id="Td25"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label8" runat="server" Text="Joining Date"></asp:Label>
                                   </td>
                                   <td id="Td26"  runat="server" class="auto-style16"> </td>
                                   <td id="Td27"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtjoindt" runat="server" CssClass="TextBox_Normal" MaxLength="20" onblur="Checktodaydate('ContentPlaceHolder1_txtjoindt')"></asp:TextBox>
                                       <cc1:CalendarExtender ID="txtjoindt_CalendarExtender"  runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtjoindt">
                                       </cc1:CalendarExtender>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtjoindt" ErrorMessage="Joining date required" ForeColor="Red" ToolTip="Code required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td28"  runat="server"> </td>
                               </tr>
                               <tr id="Tr8"  runat="server">
                                   <td id="Td29"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label9" runat="server" Text="Nature Of Post"></asp:Label>
                                   </td>
                                   <td id="Td30"  runat="server" class="auto-style16"> </td>
                                   <td id="Td31"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtnaturepost" runat="server" CssClass="TextBox_Normal" MaxLength="250" TextMode="MultiLine"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtnaturepost" ErrorMessage="Nature of post required" ForeColor="Red" InitialValue="0" ToolTip="Code required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td32"  runat="server"> </td>
                               </tr>
                               <tr id="Tr9"  runat="server">
                                   <td id="Td33"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label10" runat="server" Text="Official Id"></asp:Label>
                                   </td>
                                   <td id="Td34"  runat="server" class="auto-style16"> </td>
                                   <td id="Td35"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtofficialid" runat="server" CssClass="TextBox_Normal" MaxLength="250"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtofficialid" ErrorMessage="Official id required" ForeColor="Red" InitialValue="0" ToolTip="Official Id required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td36"  runat="server"> </td>
                               </tr>
                               <tr id="Tr10"  runat="server">
                                   <td id="Td37"  runat="server" class="auto-style19">
                                       <asp:Label ID="Label5" runat="server" Text="Work Phone"></asp:Label>
                                   </td>
                                   <td id="Td38"  runat="server" class="auto-style16"> </td>
                                   <td id="Td39"  runat="server" class="auto-style25">
                                       <asp:TextBox ID="txtPhone" runat="server" AutoPostBack="True" CssClass="TextBox_Normal" MaxLength="10"></asp:TextBox>
                                       <cc1:FilteredTextBoxExtender ID="txtPhone_FilteredTextBoxExtender"  runat="server" Enabled="True" FilterType="Numbers" TargetControlID="txtPhone">
                                       </cc1:FilteredTextBoxExtender>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtPhone" ErrorMessage="Phone no required" ForeColor="Red" ToolTip="Phone no required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                       <asp:RegularExpressionValidator ID="RegularExpressionValidator200" runat="server" ControlToValidate="txtPhone" ErrorMessage="mobile must be minimum 10 characters long" ForeColor="Red" ToolTip="mobile must be minimum 10 characters long" ValidationExpression="[^ \t\n\r]{10,15}" ValidationGroup="master">*</asp:RegularExpressionValidator>
                                   </td>
                                   <td id="Td40"  runat="server">
                                        </td>
                               </tr>
                               <tr id="Tr11"  runat="server">
                                   <td id="Td41"  runat="server" class="auto-style20">
                                       <asp:Label ID="Label11" runat="server" Text="CTC"></asp:Label>
                                   </td>
                                   <td id="Td42"  runat="server" class="auto-style21"></td>
                                   <td id="Td43"  runat="server" class="auto-style22">
                                       <asp:TextBox ID="txtctc" runat="server" AutoPostBack="True" CssClass="TextBox_Normal" MaxLength="10"></asp:TextBox>
                                       <cc1:FilteredTextBoxExtender ID="txtctc_FilteredTextBoxExtender"  runat="server" Enabled="True" FilterType="Numbers" TargetControlID="txtctc">
                                       </cc1:FilteredTextBoxExtender>
                                       <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtctc" ErrorMessage="CTC required" ForeColor="Red" ToolTip="CTC required" ValidationGroup="master">*</asp:RequiredFieldValidator>
                                   </td>
                                   <td id="Td44"  runat="server" class="auto-style23"> </td>
                               </tr>
                               <tr id="Tr13"  runat="server">
                                   <td id="Td49"  runat="server" class="auto-style53"> </td>
                                   <td id="Td50"  runat="server" class="auto-style54"></td>
                                   <td id="Td51"  runat="server" class="auto-style55">
                                       <asp:Button ID="btnnextmaster" runat="server" CssClass="btnSave" OnClick="btnnextmaster_Click" ValidationGroup="master" Width="76px" />
                                       <asp:Button ID="btnresetmas" runat="server" CausesValidation="False" CssClass="btnReset" OnClick="btnresetmas_Click" />
                                       <asp:Button ID="btncancel" runat="server" CausesValidation="False" CssClass="btnCancel" OnClick="btncancel_Click" PostBackUrl="~/Administrator/Home.aspx" />
                                   </td>
                                   <td  runat="server" class="auto-style56"></td>
                                   </tr>
                               <tr id="Tr12"  runat="server">
                                   <td id="Td45"  runat="server" colspan="4">
                                       <asp:Button ID="Button1" runat="server" CausesValidation="False" CssClass="Nxtbtn" OnClick="btnnextm_Click" Style="float:right;" />
                                   </td>

                              </tr>
                           </table>
                       </td>
              </tr>
                            
<tr  runat="server"><td  runat="server">
  <table class="gridstyle" id="pnlmastersrch"   runat="server">
             <tr id="Tr14"  runat="server">
                 <td id="Td53"  runat="server">               
        <asp:GridView ID="grdmaster" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#627074" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="None" PageSize="20" Width="100%">
                        <PagerSettings FirstPageImageUrl="~/App_Themes/Oxygen/images/expand.png" LastPageImageUrl="~/App_Themes/Oxygen/images/collapse.png" Mode="NumericFirstLast" />
                        <RowStyle CssClass="newRowStyle" />
                        <Columns>
                            <asp:TemplateField HeaderText="#">
                                <ItemTemplate>
                                    <asp:Label ID="lblno0" runat="server" Text="<%# Container.DataItemIndex+1  %>"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="First_Name" HeaderText="Name">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DesignationId" HeaderText="Designation">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DepartmentId" HeaderText="Department">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Nature_Post" HeaderText="Nature Of Post">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="official_id" HeaderText="Official Id">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="workphone" HeaderText="Work Phone">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CTC" HeaderText="CTC">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                             <asp:TemplateField HeaderText="Edit">
                                        <ItemTemplate>
                                       <asp:ImageButton ID="Imageeditmaster" runat="server" CausesValidation="False" CommandArgument='<%# Eval("Emp_Id") %>' CommandName="" ImageUrl="~/App_Themes/images/edit.png" ToolTip="Edit" OnClick="Imageeditmaster_Click"   />

                                        </ItemTemplate>

<HeaderStyle HorizontalAlign="Left"></HeaderStyle>

                                        <ItemStyle HorizontalAlign="Left"  />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Delete">
                                        <ItemTemplate>
                                      <asp:ImageButton ID="Imagedelmaster" runat="server" CausesValidation="False" CommandArgument='<%# Eval("Emp_Id") %>' CommandName="" ImageUrl="~/App_Themes/images/delete.png" meta:resourcekey="imgDeleteResource1" ToolTip="Delete" OnClick="Imagedelmaster_Click"  OnClientClick=" return ConfirmDelete();"/>
                                        </ItemTemplate>
                                       
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>

<ItemStyle HorizontalAlign="Left"></ItemStyle>
                                       
                                    </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="White" ForeColor="#333333" />
                        <PagerStyle CssClass="newpgrStyle" HorizontalAlign="Center" />
                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <HeaderStyle CssClass="newhead" />
                        <AlternatingRowStyle CssClass="newAltRowStyle" />
                        <EmptyDataTemplate>
                            <asp:Label ID="lblerr0" runat="server" ForeColor="Red" Text="No Employees Found"></asp:Label>
                        </EmptyDataTemplate>
                    </asp:GridView>
                     </td></tr>
            
             </table>

 </td></tr>
                 
     </table>
                        </asp:Panel>
                             </ContentTemplate>
                </cc1:TabPanel>
Posted
Updated 9-Jan-14 0:49am
v2
Comments
Sibasisjena 9-Jan-14 6:43am    
Post your codes.
ravikhoda 9-Jan-14 6:58am    
on which button ? please also post java script function that you want to call ?
Sampath Lokuge 9-Jan-14 7:00am    
Check whether is there any client side errors by using chrome dev tools ?
vineethnair 13-Jan-14 1:24am    
thanks for reply

1 solution

HTML
'ContentPlaceHolder1_TabContainer1_TabPanelmaster_txtjoindt'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900