Question on the Compare Validator

G

Guest

RE: Visual Studio, .net, Web Based Programming.

Well now that I understand how to validate that a date is a date using a compare validator, a new snafu came up. Most of my dates are just coming from textboxes on the screen, but a few are grid footer fields. (I was planning on using grid footers for textboxes that eventually get inserted into an Oracle database, because there is no built in insert functionality in the data grind supplied with Visual Studio.)

How can I get Visual Studio to recognize a footer field and show it in the "control to validate" pick list? I tried typing in the name free form but than I got an error at run time. ("Unable to find control id .... etc.")

Thsnks.

P.D.
 
G

Gary Chang

Hi Paul,

Thanks for you posting in the group!

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
M

[MSFT]

Hi Paul,

We can set the Validator's property in HTML view. Additionally, the Textbox
and Validator control should be in same DataGrid footer template. For
example:

<asp:DataGrid id="MyDataGrid" runat="server" ...>
<Columns>
<asp:TemplateColumn>
...
<FooterTemplate>
<asp:TextBox ID="t1" Runat="server">sss</asp:TextBox>
<asp:CompareValidator id="CompareValidator1" runat="server"
ControlToValidate="t1" ErrorMessage="Invalid Date!" Type="Date"
Operator="DataTypeCheck"></asp:CompareValidator>
</FooterTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top