| | |
two different validation with two different buttons. in web application
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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
- 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#)
- PHP Web Application Developer - FLORIDA (Web Development Job Offers)
- 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
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form gridview gudi iis image javascript list listbox menu mouse mssql nameisnotdeclared news novell numerical opera order parent problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl






