Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. validation controls

validation controls

Scheduled Pinned Locked Moved ASP.NET
regexhelp
10 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_3259094
    wrote on last edited by
    #1

    hello i have used required field and regular expression validator on my page. but either field is empty or not page get post back. plz help me some one

    Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

    S C 2 Replies Last reply
    0
    • M Member_3259094

      hello i have used required field and regular expression validator on my page. but either field is empty or not page get post back. plz help me some one

      Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

      S Offline
      S Offline
      sumit7034
      wrote on last edited by
      #2

      What do u want?

      M 1 Reply Last reply
      0
      • M Member_3259094

        hello i have used required field and regular expression validator on my page. but either field is empty or not page get post back. plz help me some one

        Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

        C Offline
        C Offline
        chapidi
        wrote on last edited by
        #3

        [Message Deleted]

        M 1 Reply Last reply
        0
        • S sumit7034

          What do u want?

          M Offline
          M Offline
          Member_3259094
          wrote on last edited by
          #4

          actualy validation controls shows error message but page get postback. so how to avoid page post back when validation controls show error.

          Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

          1 Reply Last reply
          0
          • C chapidi

            [Message Deleted]

            M Offline
            M Offline
            Member_3259094
            wrote on last edited by
            #5

            i think behaviour of required validation control is to prevent page postback if field is empty.

            Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

            A 1 Reply Last reply
            0
            • M Member_3259094

              i think behaviour of required validation control is to prevent page postback if field is empty.

              Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

              A Offline
              A Offline
              Amit Agarrwal
              wrote on last edited by
              #6

              yeah this is true, but what's happening with your Requiredfield validator.

              Amit Agarwal

              M 1 Reply Last reply
              0
              • A Amit Agarrwal

                yeah this is true, but what's happening with your Requiredfield validator.

                Amit Agarwal

                M Offline
                M Offline
                Member_3259094
                wrote on last edited by
                #7

                validation control shows error but page is getting postback on button click.

                Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

                M 1 Reply Last reply
                0
                • M Member_3259094

                  validation control shows error but page is getting postback on button click.

                  Rajeev Kr. Sharma InfoFace Technologies Pvt. Ltd.

                  M Offline
                  M Offline
                  meeram395
                  wrote on last edited by
                  #8

                  can you paste your code (HTML) for the Required Field Validator?

                  Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

                  M 1 Reply Last reply
                  0
                  • M meeram395

                    can you paste your code (HTML) for the Required Field Validator?

                    Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

                    M Offline
                    M Offline
                    Member_3259094
                    wrote on last edited by
                    #9

                    <%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/Backend/Home.master" AutoEventWireup="true" CodeFile="Backend.aspx.cs" Inherits="Backend_Backend" Title="Untitled Page" %> <%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="cc" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="javascript" type="text/javascript"> function CheckTime(s,e) { var ddl1 = document.getElementById('<%=ddl_starttime.ClientID %>'); var ddl2 = document.getElementById('<%=ddl_endtime.ClientID %>'); var selIndex1,selIndex2; selIndex1 = ddl1.selectedIndex; selIndex2 = ddl2.selectedIndex; if(selIndex1 > selIndex2) { e.IsValid = false; } } </script> <div class="container"> <div class="containerin"> <div class="head-a"> <div class="head-txt"><a href="#">Manange My Openhomes</a> > <a href="#">Add a New Openhome</a></div> </div> <div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div> <div class="online">Add a new Openhome</div> <div class="bot-table"> <div class="row"> <div>Property Location</div> <div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div> <div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0"> <tr> <td class="row_form" width="10%" valign="top">Street Number</td> <td align="left" width="50%" valign="top"> <asp:TextBox ID="txtStreetNumber" runat="server" Width="300px" Font-Names="Tahoma" Font-Size="16px" ForeColor="#919295" BorderStyle="Solid" BorderColor="#aaaaaa"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtStreetNumber" ErrorMessage="Wrong value street Number not entered" ValidationExpression="^\d+$" SetFocusOnError="True" Display="None"></asp:RegularExpressionValidator> <asp:RequiredFieldValidator ID="rfv_streetno" runat="server" ControlToValidate="txtStreetNumber" ErrorMessage="Street Number not entered" SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator> <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please check the f

                    K 1 Reply Last reply
                    0
                    • M Member_3259094

                      <%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/Backend/Home.master" AutoEventWireup="true" CodeFile="Backend.aspx.cs" Inherits="Backend_Backend" Title="Untitled Page" %> <%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="cc" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="javascript" type="text/javascript"> function CheckTime(s,e) { var ddl1 = document.getElementById('<%=ddl_starttime.ClientID %>'); var ddl2 = document.getElementById('<%=ddl_endtime.ClientID %>'); var selIndex1,selIndex2; selIndex1 = ddl1.selectedIndex; selIndex2 = ddl2.selectedIndex; if(selIndex1 > selIndex2) { e.IsValid = false; } } </script> <div class="container"> <div class="containerin"> <div class="head-a"> <div class="head-txt"><a href="#">Manange My Openhomes</a> > <a href="#">Add a New Openhome</a></div> </div> <div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div> <div class="online">Add a new Openhome</div> <div class="bot-table"> <div class="row"> <div>Property Location</div> <div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div> <div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0"> <tr> <td class="row_form" width="10%" valign="top">Street Number</td> <td align="left" width="50%" valign="top"> <asp:TextBox ID="txtStreetNumber" runat="server" Width="300px" Font-Names="Tahoma" Font-Size="16px" ForeColor="#919295" BorderStyle="Solid" BorderColor="#aaaaaa"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtStreetNumber" ErrorMessage="Wrong value street Number not entered" ValidationExpression="^\d+$" SetFocusOnError="True" Display="None"></asp:RegularExpressionValidator> <asp:RequiredFieldValidator ID="rfv_streetno" runat="server" ControlToValidate="txtStreetNumber" ErrorMessage="Street Number not entered" SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator> <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please check the f

                      K Offline
                      K Offline
                      Krazy Programmer
                      wrote on last edited by
                      #10

                      RajeevKumarSharma wrote:

                      Hi Why dont you use the Update pannel

                      If You win You need not Explain............ But If You Loose You Should not be there to Explain......

                      %>]]>

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups