Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Validation messages not displaying

Reply
Thread Tools

Validation messages not displaying

 
 
ann
Guest
Posts: n/a
 
      06-26-2006
I am using a required field validator and a validator summary for a datagrid.
On the update, I check for isvalid against the required - which works fine.
My problem is that when not valid, neither the val.summary message or my *
next to the required field appears. I can see them in design ...
Anyone have any idea what I might be doing wrong?
<asp:validationsummary id="valSummary" Width="253px" Height="32px"
Font-Size="Smaller" DisplayMode="List"ShowSummary="True" HeaderText="<b>The
following errors were found:</b>" Runat="server"></asp:validationsummary>

<asp:requiredfieldvalidator id="Requiredfieldvalidator1" Runat="server"
ControlToValidate="txtTransDate" ErrorMessage="* Transaction Date must be in
the form of mm/dd/yy"Display="dynamic">*</asp:requiredfieldvalidator>
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-26-2006
Hi Ann,

I think you have some text where it isn't allowed. The code below works for
me.

Ken
Microsoft MVP [ASP.NET]

<%@ page language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Error test</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:validationsummary runat="server" id="valSummary"
displaymode="List" font-size="Smaller" headertext=""
height="32px" showsummary="True" width="253px">
</asp:validationsummary>
<asp:textbox id="txtTransDate" runat="server">
</asp:textbox>
<asp:requiredfieldvalidator id="Requiredfieldvalidator1"
runat="server" controltovalidate="txtTransDate"
display="dynamic"
errormessage="* Transaction Date must be in the form of
mm/dd/yy">*
</asp:requiredfieldvalidator>
<br />
<br />
<asp:button id="Button1" runat="server" text="Button" /></div>
</form>
</body>
</html>


"ann" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using a required field validator and a validator summary for a
>datagrid.
> On the update, I check for isvalid against the required - which works
> fine.
> My problem is that when not valid, neither the val.summary message or my *
> next to the required field appears. I can see them in design ...
> Anyone have any idea what I might be doing wrong?
> <asp:validationsummary id="valSummary" Width="253px" Height="32px"
> Font-Size="Smaller" DisplayMode="List"ShowSummary="True"
> HeaderText="<b>The
> following errors were found:</b>" Runat="server"></asp:validationsummary>
>
> <asp:requiredfieldvalidator id="Requiredfieldvalidator1" Runat="server"
> ControlToValidate="txtTransDate" ErrorMessage="* Transaction Date must be
> in
> the form of mm/dd/yy"Display="dynamic">*</asp:requiredfieldvalidator>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Summary Message Box Not Displaying =?Utf-8?B?TWlrZSBNb29yZQ==?= ASP .Net 4 12-09-2004 05:09 AM
Displaying a Validation Error in a Validation Summary Control Lucas Tam ASP .Net 2 02-26-2004 07:49 PM
Validation Summary Control not displaying MessageBox Chris Lane ASP .Net Web Controls 11 11-24-2003 06:58 PM
Re: Pipex news server - messages not displaying °Mike° Computer Support 0 07-21-2003 10:57 PM
Re: Pipex news server - messages not displaying kerplunKuK Computer Support 0 07-21-2003 10:55 PM



Advertisments