| | |
two different validation with two different buttons. in web application
![]() |
•
•
Join Date: Sep 2009
Posts: 57
Reputation:
Solved Threads: 0
Hi
i have 3 textboxes, TBDate, TBRangeFrom, TBRangeTo.
I have use custom validation and insert code to validate date
but i need to use two different button to validate data in same webform.
For example
TBDate to use btn1 to validate and then when click will link to other form
whereas TBRangeFrom and TBRangeTo will use btn2 to validate and hence lead to another different form.. how am i going to make this happen?
because right now when i click just one button it will validate everything.=/
i have 3 textboxes, TBDate, TBRangeFrom, TBRangeTo.
I have use custom validation and insert code to validate date
but i need to use two different button to validate data in same webform.
For example
TBDate to use btn1 to validate and then when click will link to other form
whereas TBRangeFrom and TBRangeTo will use btn2 to validate and hence lead to another different form.. how am i going to make this happen?
because right now when i click just one button it will validate everything.=/
Last edited by facadie; Sep 28th, 2009 at 5:53 am.
•
•
Join Date: Sep 2009
Posts: 57
Reputation:
Solved Threads: 0
•
•
•
•
can you please eloborate,post yours Code.
Thx,
Chandru
NetProgrammingHelp.com
ASP.NET Syntax (Toggle Plain Text)
<%@ Page Language="C#" MasterPageFile="~/PATS.master" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Report" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <br /> <div style="text-align: left"> <table style="font-family: arial"> <tr> <td style="width: 147px; height: 21px; text-align: right"> <strong>Generate Report</strong></td> <td style="width: 176px; height: 21px"> </td> <td style="width: 22px; height: 21px"> </td> <td style="width: 176px; height: 21px"> </td> </tr> <tr> <td style="width: 147px; height: 28px;"> </td> <td style="width: 176px; height: 28px;"> </td> <td style="width: 22px; height: 28px;"> </td> <td style="width: 176px; height: 28px;"> </td> </tr> <tr> <td style="width: 147px; height: 20px; text-align: right"> By Date</td> <td style="width: 176px; height: 20px"> <asp:TextBox ID="TBDate" runat="server"></asp:TextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="*" ControlToValidate="TBDate" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator></td> <td style="width: 22px; height: 20px"> </td> <td style="width: 176px; height: 20px"> </td> </tr> <tr> <td style="width: 147px"> </td> <td style="width: 176px"> <asp:Button ID="BTNGenerateDate" runat="server" Text="Generate" Width="80px" /></td> <td style="width: 22px"> </td> <td style="width: 176px"> </td> </tr> <tr> <td style="width: 147px; height: 41px;"> </td> <td style="width: 176px; height: 41px;"> </td> <td style="width: 22px; height: 41px;"> </td> <td style="width: 176px; height: 41px;"> </td> </tr> <tr> <td style="width: 147px; text-align: right"> By Range</td> <td style="width: 176px"> </td> <td style="width: 22px"> </td> <td style="width: 176px"> </td> </tr> <tr> <td style="width: 147px; text-align: right"> <em>From</em></td> <td style="width: 176px"> <asp:TextBox ID="TBRangeFrom" runat="server"></asp:TextBox></td> <td style="width: 22px; text-align: right"> <em>To</em></td> <td style="width: 176px"> <asp:TextBox ID="TBRangeTo" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width: 147px"> </td> <td style="width: 176px"> <asp:Button ID="BTNGenerateRange" runat="server" Text="Generate" Width="80px" /></td> <td style="width: 22px"> </td> <td style="width: 176px"> </td> </tr> </table></div> <br /> </asp:Content>
Hi i think with a picture you might understand what I'm trying to ask.=) cause Im usually not good at phrasing question.
•
•
Join Date: Sep 2009
Posts: 57
Reputation:
Solved Threads: 0
0
#6 Oct 8th, 2009
yea i did saw that so i just type under validation group. like the textbox i want to validate and the btn when click then it validate or???
![]() |
Similar Threads
- PHP Web Application Developer - FLORIDA (Web Development Job Offers)
- Please review konkuri.com a new sport web application (Website Reviews)
- News Story: OFFICIAL: web application security is pants (ASP.NET)
- Licensing web application products (C#)
- Colossal Squid Industries: Web Application Developer (Web Development Job Offers)
- tree structure in web application (HTML and CSS)
- help to set up "Sun Java™ System Application Server PE 8" for web application (Java)
- ColdFusion 5 Web Application Construction Kit (ColdFusion)
Other Threads in the ASP.NET Forum
- Previous Thread: Online exam & Quiz
- Next Thread: Application Deployment
Views: 489 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.aspx .net 2.0 3.5 activexcontrol ajax alltypeofvideos asp asp.net asp.net-books asp.net-security bc30451 bottomasp.net browser button c# chat checkbox click commonfunctions connectionstring control countryselector crystal dataaccesslayer database datagridview datagridviewcheckbox datalist development dgv directory domain dropdownmenu edit expose feedback findcontrol flash folder form form-auth-subdomain form-authentication formatdecimal forms gridview identity iframe iis images impersonation index insert javascript john-raasch json learn-asp.net list location-web-config login maps masterpage menu mobile mono mssql mvc navigation numerical panelmasterpagebuttoncontrols parent problem profile redirect relationaldatabases save search security server session silverlight simple software sql suse tracking translate-site treeview update url validation vb.net view vista visual visual-studio visualstudio web website xml






