Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
i am using tab control for my web page and have validation summary to show the errors an i assign the same validation gropus to both validation summary and text boxes etc (button)
but when i click on button the post back occurs instead of validation
 
code is here
 
<asp:TabPanel ID="TabPanel4" runat="server" HeaderText="Phone Calls">
                                <ContentTemplate>
                                    <%--  <uc2:wucPhoneCall ID="wucPhoneCall1" runat="server" />--%>
                                    <div>
                                        <uc1:wucDisplayMessage ID="wucDisplayMessage4" runat="server" />
                                        <asp:HiddenField ID="hdfChanged_PH" runat="server" />
                                        <asp:HiddenField ID="IsLoad" runat="server" Value="0" />
                                    </div>
                                    <div>
                                        <asp:ValidationSummary ID="ValidationSummary5" EnableClientScript="false" runat="server" CssClass="msg" ValidationGroup="PhoneValidationGroup"
                                            HeaderText="Mandatory Input(s)" />
                                    </div>
                                    <asp:Panel ID="pnlPhoneCallsEntry" runat="server" DefaultButton="btnSavePH">
                                        <div class="SectionHeader">
                                            <table width="100%">
                                                <tr>
                                                    <td class="SectionHeader">
                                                        Phone Call Information
                                                        <div style="float: right;">
                                                            <asp:Button ID="btnSavePH" runat="server" CssClass="btn" Text="Save" OnClick="btnSavePH_Click"
                                                                ValidationGroup="PhoneValidationGroup" />
                                                            <asp:Button ID="btnCancelPH" runat="server" CssClass="btn" Text="Cancel" OnClick="btnCancelPH_Click"
                                                                CausesValidation="false" />
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <table class="tblEntry">
                                            <tr>
                                                <td colspan="4">
                                                    <asp:UpdatePanel runat="server" ID="up" UpdateMode="Always">
                                                        <ContentTemplate>
                                                            <table class="tblEntry" id="tblPhoneCall">
                                                                <%-- <tr>
                        <td class="SectionHeader" colspan="4">
                            Phone Call Information
                        </td>
                    </tr>--%>
                                                                <tr>
                                                                    <td class="Caption2" id="tdCaptionCutomer" runat="server">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Customer is required"
                                                                            ValidationGroup="PhoneValidationGroup" ControlToValidate="ddlCustomer" CssClass="failureNotification"
                                                                            SetFocusOnError="True" InitialValue="0">*</asp:RequiredFieldValidator>
                                                                        Customer
                                                                    </td>
                                                                    <td class="Entry" id="tdEntryCutomer" runat="server">
                                                                        <asp:DropDownList runat="server" ID="ddlCustomer" CssClass="ddl" AutoPostBack="true"
                                                                            onchange="txtChanged_PH();" OnSelectedIndexChanged="ddlCustomer_SelectedIndexChanged">
                                                                        </asp:DropDownList>
                                                                    </td>
                                                                    <td colspan="2">
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="Caption2">
                                                                        <asp:RequiredFieldValidator ID="rfvDirection" runat="server" ErrorMessage="Direction is required"
                                                                            ValidationGroup="PhoneValidationGroup" ControlToValidate="ddlDirection" CssClass="failureNotification"
                                                                            SetFocusOnError="True" InitialValue="0">&nbsp</asp:RequiredFieldValidator>
                                                                        <span class="failureNotification">*</span> Direction
                                                                    </td>
                                                                    <td class="Entry" colspan="3">
                                                                        <asp:DropDownList runat="server" ID="ddlDirection" Width="150px" CssClass="ddl" onchange="ddlPhoneType_onchange();">
                                                                            <%--OnSelectedIndexChanged="ddlDirection_SelectedIndexChanged" AutoPostBack="true"--%>
                                                                        </asp:DropDownList>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="Caption2">
                                                                        <span class="failureNotification" runat="server" id="spanPhoneType">*</span> Phone
                                                                        Type
                                                                    </td>
                                                                    <td class="Entry">
                                                                        <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
                                                                            <Triggers>
                                                                                <asp:AsyncPostBackTrigger ControlID="ddlCustomer" EventName="SelectedIndexChanged" />
                                                                                <asp:AsyncPostBackTrigger ControlID="ddlDirection" EventName="SelectedIndexChanged" />
                                                                            </Triggers>
                                                                            <ContentTemplate>
                                                                                <asp:DropDownList runat="server" ID="ddlPhoneType" Width="150px" CssClass="ddl" AutoPostBack="true"
                                                                                    onchange="txtChanged_PH();" OnSelectedIndexChanged="ddlPhoneType_SelectedIndexChanged">
                                                                                </asp:DropDownList>
                                                                                <%--<asp:RequiredFieldValidator ID="rfvPhoneType" runat="server" ErrorMessage="Phone type is required"
                                    ValidationGroup="PhoneValidationGroup" ControlToValidate="ddlPhoneType" CssClass="failureNotification"
                                    SetFocusOnError="True" InitialValue="0">&nbsp</asp:RequiredFieldValidator>--%>
                                                                                <asp:CustomValidator ID="cvPhoneType" runat="server" ControlToValidate="ddlPhoneType"
                                                                                    ValidateEmptyText="true" ErrorMessage="Phone type is required" ClientValidationFunction="ValidatePhoneType"
                                                                                    SetFocusOnError="true" ForeColor="Red" ValidationGroup="PhoneValidationGroup">&nbsp</asp:CustomValidator>
                                                                            </ContentTemplate>
                                                                        </asp:UpdatePanel>
                                                                    </td>
                                                                    <td class="Caption2">
                                                                        <asp:FilteredTextBoxExtender ID="ftbePhone" runat="server" TargetControlID="txtPhoneNumber"
                                                                            ValidChars="0123456789 " FilterMode="ValidChars" FilterType="Custom">
                                                                        </asp:FilteredTextBoxExtender>
                                                                        <span class="failureNotification" runat="server" id="spanPhoneNumber">*</span> Phone
                                                                        Number
                                                                    </td>
                                                                    <td class="Entry">
                                                                        <%-- <asp:UpdatePanel ID="upPhoneNumber" runat="server" UpdateMode="Conditional">
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddlPhoneType" EventName="SelectedIndexChanged" />
                                    <asp:AsyncPostBackTrigger ControlID="ddlDirection" EventName="SelectedIndexChanged" />
                                    <asp:AsyncPostBackTrigger ControlID="txtPhoneNumber" />
                                </Triggers>
                                <ContentTemplate>--%>
                                                                        <%-- <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlPhoneType" />
                                <asp:AsyncPostBackTrigger ControlID="ddlPhoneNumber"  />
                            </Triggers>
                            <ContentTemplate>--%>
                                                                        <asp:DropDownList ID="ddlPhoneNumber" runat="server" Visible="false" CssClass="ddl"
                                                                            onchange="txtChanged_PH();" AutoPostBack="true" OnSelectedIndexChanged="ddlPhoneNumber_SelectedIndexChanged"
                                                                            Width="104">
                                                                        </asp:DropDownList>
                                                                        <asp:TextBox runat="server" ID="txtPhoneNumber" CssClass="txt" Width="100" onchange="txtChanged_PH();"
                                                                            MaxLength="15"></asp:TextBox>
                                                                        <asp:CustomValidator ID="cvPhoneNumber" runat="server" ControlToValidate="txtPhoneNumber"
                                                                            ValidateEmptyText="true" ErrorMessage="Phone Number is required" ClientValidationFunction="ValidatePhoneNumber"
                                                                            SetFocusOnError="true" ForeColor="Red" ValidationGroup="PhoneValidationGroup">&nbsp</asp:CustomValidator>
                                                                        <asp:RequiredFieldValidator ID="rfvDdlPhoneNumber" runat="server" ErrorMessage="Phone Number is required"
                                                                            ValidationGroup="PhoneValidationGroup" ControlToValidate="ddlPhoneNumber" CssClass="failureNotification"
                                                                            SetFocusOnError="True" InitialValue="0">&nbsp</asp:RequiredFieldValidator>
                                                                        <%--<asp:RequiredFieldValidator ID="rfvPhoneNumber" runat="server" ErrorMessage="Phone Number is required"
                            ValidationGroup="PhoneValidationGroup" ControlToValidate="txtPhoneNumber" CssClass="failureNotification"
                            SetFocusOnError="True" InitialValue=" ">&nbsp</asp:RequiredFieldValidator>--%>
                                                                        <%--  </ContentTemplate>
                        </asp:UpdatePanel>--%>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr id="tr8" runat="server">
                                                <td class="Caption">
                                                    Follow Up Date
                                                </td>
                                                <td class="Entry" colspan="3">
                                                    <asp:TextBox runat="server" ID="txtFollowUpDate_PH" CssClass="txt" Width="100" onchange="Validation();"></asp:TextBox>
                                                    <asp:CalendarExtender ID="CalendarExtender5" runat="server" TargetControlID="txtFollowUpDate_PH"
                                                        Format="dd/MM/yyyy">
                                                    </asp:CalendarExtender>
                                                    (if required)
                                                </td>
                                            </tr>
                                            <tr id="trFollowUpUser" runat="server">
                                                <td class="Caption">
                                                    <%--   <asp:RequiredFieldValidator ID="rfvFollowUpuser" runat="server" ErrorMessage="Follow Up User Is Required"
                    ValidationGroup="PhoneValidationGroup" InitialValue="" ControlToValidate="lstbxFieldsAdded"
                    CssClass="failureNotification" SetFocusOnError="True" Enabled="true">&nbsp</asp:RequiredFieldValidator>--%>
                                                    <span class="failureNotification">*</span> Follow Up User
                                                </td>
                                                <td class="Entry" colspan="3">
                                                    <asp:UpdatePanel runat="server" ID="upFollowUp" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <table width="100%">
                                                                <tr>
                                                                    <td width="40%">
                                                                        <asp:ListBox runat="server" ID="lstbxFieldsNonAdded" SelectionMode="Multiple" ToolTip="Add Users To Phone Call"
                                                                            onchange="txtChanged_PH();" Width="220px" Height="100px"></asp:ListBox>
                                                                    </td>
                                                                    <td style="width: 164px;">
                                                                        <div>
                                                                            <asp:Button runat="server" ID="btnAddToPhoneCall" Text=">>" Width="40px" Height="25px"
                                                                                CssClass="btn" ToolTip="Add To Phone Call" OnClick="btnAddToPhoneCall_Click"
                                                                                OnClientClick="setUnchanged_PH();" />
                                                                        </div>
                                                                        <div>
                                                                            <asp:Button runat="server" ID="btnRemoveFromPhoneCall" Text="<<" Width="40px" Height="25px"
                                                                                CssClass="btn" ToolTip="Remove From Phone Call" OnClick="btnRemoveFromPhoneCall_Click" />
                                                                        </div>
                                                                    </td>
                                                                    <td style="width: 263px;">
                                                                        <asp:ListBox runat="server" ID="lstbxFieldsAdded" SelectionMode="Multiple" ToolTip="Added Users To Phone Call"
                                                                            Width="220px" Height="100px"></asp:ListBox>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ContentTemplate>
                                                        <Triggers>
                                                            <asp:AsyncPostBackTrigger ControlID="btnAddToPhoneCall" />
                                                            <asp:AsyncPostBackTrigger ControlID="btnRemoveFromPhoneCall" />
                                                        </Triggers>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr id="trFollowUpNote" runat="server">
                                                <td class="Caption">
                                                    <%--  <asp:RequiredFieldValidator ID="rfvFollowUpNote" runat="server" ErrorMessage="Follow Up Note is required"
                    ValidationGroup="PhoneValidationGroup" ControlToValidate="txtFollowUpNote" CssClass="failureNotification"
                    SetFocusOnError="True" InitialValue="" Enabled="true">&nbsp</asp:RequiredFieldValidator>--%>
                                                    <span class="failureNotification">*</span> Follow Up Note
                                                </td>
                                                <td colspan="3" class="Entry">
                                                    <asp:TextBox runat="server" ID="txtFollowUpNote" CssClass="txtarea" Width="90%" TextMode="MultiLine"
                                                        onchange="txtChanged_PH();" Height="100px"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Caption">
                                                    Is Completed
                                                </td>
                                                <td class="Entry">
                                                    <asp:CheckBox runat="server" ID="chkCompleted" onclick="chkCompleted_change(this.checked);" /><%-- OnCheckedChanged="chkCompleted_CheckedChanged" AutoPostBack="true"--%>
                                                </td>
                                            </tr>
                                            <tr runat="server" id="trCompleted1">
                                                <td class="Caption">
                                                    Completed by
                                                </td>
                                                <td class="Entry">
                                                    <asp:TextBox runat="server" ID="txtCompletedBy" CssClass="txt" Width="250" ReadOnly="true"
                                                        onchange="txtChanged_PH();" BackColor="#EDEDED" Enabled="false"></asp:TextBox>
                                                </td>
                                                <td class="Caption">
                                                    Completed Date
                                                </td>
                                                <td class="Entry">
                                                    <asp:TextBox runat="server" ID="txtCompletedDate" CssClass="txt" Width="100" ReadOnly="true"
                                                        onchange="txtChanged_PH();" BackColor="#EDEDED" Enabled="false"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr runat="server" id="trCompleted2">
                                                <td class="Caption">
                                                    <%--<asp:RequiredFieldValidator ID="rfvNotes" runat="server" ErrorMessage="Completed Note is required"
                            ValidationGroup="PhoneValidationGroup" ControlToValidate="txtNotes" CssClass="failureNotification"
                            SetFocusOnError="True">&nbsp</asp:RequiredFieldValidator>--%>
                                                    <asp:CustomValidator ID="cvNotes" runat="server" ErrorMessage="Completed notes is required"
                                                        ClientValidationFunction="validateNotes" ValidationGroup="PhoneValidationGroup"
                                                        ControlToValidate="txtNotes_PH" ValidateEmptyText="true" CssClass="failureNotification"
                                                        SetFocusOnError="True">&nbsp</asp:CustomValidator>
                                                    <span class="failureNotification">*</span> Completed Notes
                                                </td>
                                                <td class="Entry" colspan="3">
                                                    <asp:TextBox runat="server" ID="txtNotes_PH" CssClass="txtarea" Width="90%" TextMode="MultiLine"
                                                        onchange="txtChanged_PH();" Height="100px"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Caption">
                                                    Contact Outcome
                                                </td>
                                                <td class="Entry" colspan="3">
                                                    <asp:DropDownList runat="server" ID="ddlFollowOutcome" CssClass="ddlsmall" onchange="txtChanged_PH();">
                                                        <asp:ListItem Text="" Value=""></asp:ListItem>
                                                        <asp:ListItem Text="Completed" Value="Completed"></asp:ListItem>
                                                        <asp:ListItem Text="Phone" Value="Phone"></asp:ListItem>
                                                        <asp:ListItem Text="Email" Value="Email"></asp:ListItem>
                                                        <asp:ListItem Text="Letter" Value="Letter"></asp:ListItem>
                                                        <asp:ListItem Text="other" Value="other"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Caption">
                                                    Created by
                                                </td>
                                                <td class="Entry">
                                                    <asp:TextBox runat="server" ID="txtCreatedUser_PH" CssClass="txt" Width="250" ReadOnly="true"
                                                        onchange="txtChanged_PH();" BackColor="#EDEDED" Enabled="false"></asp:TextBox>
                                                </td>
                                                <td class="Caption">
                                                    Created Date
                                                </td>
                                                <td class="Entry">
                                                    <asp:TextBox runat="server" ID="txtCreatedDate_PH" CssClass="txt" Width="100" ReadOnly="true"
                                                        onchange="txtChanged_PH();" BackColor="#EDEDED" Enabled="false"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                    <asp:Panel ID="pnlPhoneCallsList" runat="server" DefaultButton="btnPhoneCallsSearch_PH">
                                        <div class="frmlstbtn">
                                            <asp:Button runat="server" ID="btnCreatePhoneCalls" CausesValidation="false" CssClass="btn"
                                                Text="Add Phone Calls" OnClick="btnAddNewPH_Click" OnClientClick="setUnchanged_PH();" /></div>
                                        <div class="frmlstcont">
                                            <table width="100%">
                                                <tr>
                                                    <td class="SectionHeader">
                                                        Filter
                                                        <div style="float: right;">
                                                            <asp:Button runat="server" ID="btnPhoneCallsSearch_PH" CssClass="btn" Text="Apply"
                                                                OnClick="btnPhoneCallsSearchPH_Click" CausesValidation="false" />
                                                            <asp:Button runat="server" ID="btnClear_PH" CssClass="btn" Text="Clear" OnClick="btnClearPH_Click"
                                                                CausesValidation="false" />
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%">
                                            </table>
                                            <div class="mt10">
                                                <asp:GridView ID="gvPhoneCall" runat="server" Width="100%" AutoGenerateColumns="False"
                                                    EnableViewState="true" EmptyDataText="No record found!" CssClass="GWF" DataSourceID="odsPhoneCall"
                                                    AllowPaging="True" OnRowCommand="gvPhoneCalls_RowCommand" ShowHeaderWhenEmpty="True">
                                                    <AlternatingRowStyle CssClass="GridAltRow" />
                                                    <HeaderStyle CssClass="GridHeader" />
                                                    <RowStyle CssClass="GridRow" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="ID" SortExpression="NoteId">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtid" CssClass="txtw0b" Width="88%" ReadOnly="true"
                                                                    Enabled="false" BackColor="White"></asp:TextBox>
                                                                <div>
                                                                    ID</div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="imgbtnEdit" runat="server" Text='<%# Eval("PhoneCallId") %>'
                                                                    Style="text-decoration: underline" CausesValidation="false" CommandName="Select"
                                                                    CommandArgument='<%# Eval("PhoneCallId").ToString() %>' />
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="10%" />
                                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Date/Time" SortExpression="CreatedDate">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtDateFrom" CssClass="txtdate" Width="85%"></asp:TextBox>
                                                                <asp:MaskedEditExtender ID="meeDateFrom" runat="server" CultureName="en-GB" ErrorTooltipEnabled="True"
                                                                    TargetControlID="txtDateFrom" Mask="99/99/9999" MaskType="Date" AcceptNegative="None" />
                                                                <asp:RegularExpressionValidator ID="revStartDate" runat="server" ControlToValidate="txtDateFrom"
                                                                    ValidationGroup="PhoneValidationGroup" SetFocusOnError="true" ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"
                                                                    ErrorMessage="Invalid Start Date: dd/MM/yyyy" Display="None"></asp:RegularExpressionValidator>
                                                                <div>
                                                                    Date/Time
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblDate" runat="server" Text='<%# Eval("CreatedDate") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="20%"></HeaderStyle>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Reference" SortExpression="Reference">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtreference" CssClass="txtw0b" Width="88%" ReadOnly="true"
                                                                    Enabled="false" BackColor="White"></asp:TextBox>
                                                                <div>
                                                                    Reference
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <a href='<%# GetEditURL_PH( Eval("ReferenceId"),Eval("ReferenceTypeId") ) %>' style="text-decoration: none;">
                                                                    <asp:Image ID="imgbtnReference" runat="server" ImageUrl='<%# GetImgURL_PH(Eval("ReferenceTypeId")) %>'
                                                                        ImageAlign="AbsMiddle" Height="18px" Width="18px" ToolTip='<%# GeToolTip_PH(Eval("ReferenceTypeId") ) %>' />
                                                                    &nbsp; <u>
                                                                        <%# Eval("Reference") %></u> </a>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="15%" />
                                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Added By" SortExpression="CreatedUser">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtCreatedUser" CssClass="txt" Width="88%"></asp:TextBox>
                                                                <div>
                                                                    Added By
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblCreatedUser" runat="server" Text='<%# Eval("CreatedUser") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="15%"></HeaderStyle>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Direction" SortExpression="DirectionName">
                                                            <HeaderTemplate>
                                                                <asp:DropDownList runat="server" ID="ddlPhoneSrchDirection" Width="86%" CssClass="ddlfilter">
                                                                </asp:DropDownList>
                                                                <div>
                                                                    Direction
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lbldirection" runat="server" Text='<%# Eval("DirectionName") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="10%"></HeaderStyle>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblNotes" runat="server" Text='<%# Eval("Notes") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderTemplate>
                                                                <asp:TextBox ID="txtgvNotes" runat="server" CssClass="txt" Width="88%"></asp:TextBox>
                                                                <div>
                                                                    Completed Notes</div>
                                                            </HeaderTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" Width="15%"></HeaderStyle>
                                                        </asp:TemplateField>
                                                        <%--<asp:BoundField HeaderText="Notes" DataField="Notes" SortExpression="Notes">
 
                    </asp:BoundField>--%>
                                                        <%-- <asp:BoundField HeaderText="Follow Up Date" DataField="FollowUpDate" SortExpression="FollowUpDate"
                        DataFormatString="{0:dd/MM/yyyy}">--%>
                                                        <%-- <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center" />--%>
                                                        <asp:TemplateField HeaderText="Follow Up Date" SortExpression="FollowUpDate">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtFollowUpDate" CssClass="txtdate" Width="88%"></asp:TextBox>
                                                                <asp:MaskedEditExtender ID="meeFollowupDate" runat="server" CultureName="en-GB" ErrorTooltipEnabled="True"
                                                                    TargetControlID="txtFollowUpDate" Mask="99/99/9999" MaskType="Date" AcceptNegative="None" />
                                                                <div>
                                                                    Follow Up Date
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblfollowupdateDate" runat="server" Text='<%#  Convert.ToDateTime(Eval("FollowUpDate"))== DateTime.MinValue ? "" : String.Format("{0:dd/MM/yyyy}",Eval("FollowUpDate")) %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Remove">
                                                            <HeaderTemplate>
                                                                <asp:TextBox runat="server" ID="txtRemove" CssClass="txtw0b" Width="60%" ReadOnly="true"
                                                                    Enabled="false" BackColor="White"></asp:TextBox>
                                                                <div>
                                                                    Remove
                                                                </div>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="imgbtnRemove" ToolTip="Remove Linking" runat="server" ImageUrl="~/App_Themes/Default/Images/Delete.jpg"
                                                                    CommandName="cmdRemove" CommandArgument='<%# Eval("PhoneCallId")  %>' OnClientClick="return confirm('Do you want to remove linking of this record?');" />
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <PagerSettings Mode="NumericFirstLast" Position="Bottom"></PagerSettings>
                                                    <PagerStyle HorizontalAlign="Right" VerticalAlign="Middle" CssClass="GridFooter">
                                                    </PagerStyle>
                                                </asp:GridView>
                                                <div id="Div15" class="TotalRecordCountPad" style="text-align: right">
                                                    <asp:Label runat="server" ID="Label10" Text=""></asp:Label>
                                                </div>
                                                <asp:ObjectDataSource ID="odsPhoneCall" runat="server" TypeName="CRM.UI.Pages.CustomerEntry"
                                                    SelectMethod="GetPhoneCallList" SelectCountMethod="GetPhoneCallCount" OnSelecting="odsPhoneCall_Selecting"
                                                    SortParameterName="sortExpression" MaximumRowsParameterName="pageSize" EnablePaging="True">
                                                    <SelectParameters>
                                                        <asp:Parameter Name="phoneCallCriteria" Type="Object" />
                                                    </SelectParameters>
                                                </asp:ObjectDataSource>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
Posted 25-Jun-13 7:27am
Comments
Ankit Kul at 25-Jun-13 14:19pm
   
please write only relevant code

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

  Print Answers RSS
0 OriginalGriff 7,645
1 DamithSL 5,614
2 Sergey Alexandrovich Kryukov 5,344
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 25 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100