Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:56:01+00:00 2026-06-18T02:56:01+00:00

How can we write client side validation for a text box. for example: If

  • 0

How can we write client side validation for a text box.
for example:
If we have a login page then how to write the validation function to check the required field.

I have designed an application using master page. in this i am not getting script in the source page when i tried to write the code. I am getting error that only content controls are allowed means what. how to proceed i don’t understood.

Design of login page :

<div id="contenttext" align="center" >

        <tr>
            <td colspan="2" style="background-color: #E2E2E2">
                <asp:Label cssClass="orangelogotext"  runat="server" ID="lblinformation" Text="Login :"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" style="background-color: #E2E2E2">
                <asp:Label cssClass="smalltext"  runat="server" ID="lblEmail" Text="Email">
                </asp:Label>
            </td>
            <td style="background-color: #E2E2E2">
                <asp:TextBox runat="server" ID="Email" CssClass="textbox">
                </asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" style="background-color: #E2E2E2">
                <asp:Label cssClass="smalltext"  runat="server" ID="lblpassword" Text="Password" >
                </asp:Label>
            </td>
            <td style="background-color: #E2E2E2">
                <asp:TextBox runat="server" ID="Password"  Width="133px" TextMode="Password" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" style="background-color: #E2E2E2">
                <asp:Label cssClass="smalltext"  runat="server" ID="lblorganisationname" Text="Organisation Name">
                </asp:Label>
            </td>
            <td style="background-color: #E2E2E2"> 
                <asp:DropDownList ID="ddlorganisationname" runat="server" DataTextField="OrganisationName"
                    DataValueField="OrganisationID" CssClass="textbox">
                </asp:DropDownList>
            </td>
        </tr>

        <tr>
            <td align="center" colspan="2" style="background-color: #E2E2E2">
                <asp:Button runat="server" ID="btnlogin" Text="LOGIN" Height="34px" onclick="btnlogin_Click;return validateForm()" CssClass="btntext" />
            </td>
        </tr>
    </table>

regards,
Dhriti

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:56:02+00:00Added an answer on June 18, 2026 at 2:56 am

    If you use a masterpage, ensure that all the content are inside <asp:Content> tags. Thats why you are getting only content controls are allowed error.

    <asp:Content ID="Content1" ContentPlaceHolderID="Contentplaceholder1" runat="Server">
    ***all the content***
    </asp:Content>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to GWT. Can we write direct JavaScript codes for client side validations?
I'm creating registration page and I've done basic client side (JS) form validation. Now
For the ASP.NET validator controls, I want to use both client-side validation for the
I'm writing a php forms class with client and server side validation. I'm having
How can I write a website using HTML5 , CSS and JavaScript on client
I need to write some client-side javascript for a webpage that will truncate the
I have a requirement by which need to check validation between number of days
When I write client side code, I use HTML/CSS/JavaScript and lately jQuery to both
I'm trying to write a custom validation method in my app - I have
I have a problem, i use select function to wait when i can read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.