hi 
I have 1textbox and 1 button==BtnPopupL in page
I define RequiredFieldValidator for text box and use  ModalPopupExtender for button below is code:
 <asp:UpdatePanel ID="Uptload1" runat="server">
                                        <ContentTemplate>
                                            <asp:ModalPopupExtender DropShadow="true" ID="ModalPopupExtender3" PopupControlID="PnPopupL"
                                                runat="server" TargetControlID="BtnPopupL">
                                            </asp:ModalPopupExtender>
                                            <asp:ImageButton ID="BtnPopupL" OnClick="BtnPopupL_Click" runat="server"
                                                CssClass="imgpdfpro" ImageUrl="~/Image/loadpdf.png" />
                                            <asp:Panel ID="PnPopupL" runat="server" BackColor="White" CssClass="panel" Style="display: none">
                                                <div class="CloseImge">
                                                    <asp:ImageButton ID="ImageButton20" runat="server" CssClass="closeI" ImageUrl="~/image/close.png"
                                                        CausesValidation="false" />
                                                </div>
      </asp:Panel>
                                        </ContentTemplate>
here when I click on button it will show popup but I want if users don't type any text in textbox if they click on button it doesn't show popup and show error that I define in RequiredFieldValidator...
here when I don't type text in textbox  when I click on button it show both(popup and RequiredFieldValidator) but I want it doesn't show popup untill I type text in textbox...
Best Regards
Neda