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

  • SEARCH
  • Home
  • 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 7904259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:58:38+00:00 2026-06-03T09:58:38+00:00

i am system.datamodel.dataannotation for validating my views. below is my Model for the view.

  • 0

i am system.datamodel.dataannotation for validating my views.

below is my Model for the view.

using System.ComponentModel.DataAnnotations;

    public class LoginVM
{
    [Required(ErrorMessage="Please provide UserName")]
    public string UserName { get; set; }
    public string Password { get; set; }
}

below is my view for Login

<% using (Html.BeginForm())
{ %>
<% Html.ValidationSummary(true); %>
<div style="width: 100%; height: 100%; border-style: none;">
    <fieldset style="border-style: none;">
        <table style="width: 100%; height: 100%; border-style: none;" border="0">
            <tr>
                <td style="height: 100px;" colspan="4">
                </td>
                <td class="editor-label" style="width: 35%; font-size: medium;   vertical-align: top;
                    text-align: justify;">
                    <%: Html.Label("Sign in with your Account Credentials")%><br />
                    <br />
                    <a href='<%= Url.Action("LogOn","Site") %>' class="header-links">Support / Contact Us</a>
                </td>
                <td style="width: 5%;">
                </td>
                <td style="width: 60%; border-left-width: 2px; border-left-color: #E3E3E3; border-left-style: solid;">
                    <table style="border-style: none;" border="0">
                        <tr>
                            <td colspan="3">
                            </td>
                        </tr>
                        <tr style="height: 30px;">
                            <td style="width: 20%;" class="login-display-label">
                                <%: Html.LabelFor(m=>m.UserName,"UserName :") %><br />
                                <br />
                                <%: Html.LabelFor(m=>m.Password,"Password :") %><br />
                                <br />
                            </td>
                            <td style="width: 182px;" colspan="2">
                                <%: Html.TextBoxFor(m=>m.UserName,"UserName :")%><br />
                                <%: Html.ValidationMessageFor(m=>m.UserName) %><br />
                                <%: Html.TextBoxFor(m=>m.Password,"Password :")%><br />
                                <%: Html.ValidationMessageFor(m=>m.Password) %><br />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp
                            </td>
                            <td style="width: 182px;" colspan="3">
                                <input type="button" id="btnSubmit" value="Submit" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
</div>

below is the scripts i have putted on my view as well as my site.master page

   <script src="../../Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>

i have also checked my web.config for below markup

  <appSettings>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>

after lots of effort my validation doesnt occur please help me….

let me known what necessary change i have to make.

thnaks in advance

  • 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-03T09:58:40+00:00Added an answer on June 3, 2026 at 9:58 am

    change javascript Address:

    <script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
    

    and Html Helper

    Html.TextBoxFor(m=>m.UserName)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Reference: Public Const COLUMN_MODEL_ORDER As String = MDL_ORDER.ColumnName DataModel.Config.DefaultView is a System.Data.DataView What is
System.Array serves as the base class for all arrays in the Common Language Runtime
I have an existing data model using openJPA and I am trying to integrate
I have a exceedingly simplistic data model (below). I am having trouble figuring out
I'm trying to find out the system architecture using Java and I've tried out:
I have the following code: private Models.mediamanagerEntities dataModel = new Models.mediamanagerEntities(); public ActionResult Index(FormCollection
In my system we use JTable with data model. when data changes we remove
How would you design the data model for an inventory management system in RDBMS?
I'm trying to generate an entity model from a Firebird database using the Entity
I wrote a data model, into one class I need to merge 3 arrays.

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.