Click here to Skip to main content
15,887,027 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I want a clariffication on Asp.Net Pin
Chris Quinn9-Dec-13 21:39
Chris Quinn9-Dec-13 21:39 
AnswerRe: I want a clariffication on Asp.Net Pin
ZurdoDev10-Dec-13 1:48
professionalZurdoDev10-Dec-13 1:48 
AnswerRe: I want a clariffication on Asp.Net Pin
thatraja10-Dec-13 2:03
professionalthatraja10-Dec-13 2:03 
AnswerRe: I want a clariffication on Asp.Net Pin
codeman06198814-Dec-13 20:44
codeman06198814-Dec-13 20:44 
QuestionStoring tamil virtual keyboard to sql server 2005 database Pin
Anand Solomon8-Dec-13 22:38
Anand Solomon8-Dec-13 22:38 
AnswerRe: Storing tamil virtual keyboard to sql server 2005 database Pin
jkirkerx9-Dec-13 12:14
professionaljkirkerx9-Dec-13 12:14 
AnswerRe: Storing tamil virtual keyboard to sql server 2005 database Pin
Mycroft Holmes9-Dec-13 13:08
professionalMycroft Holmes9-Dec-13 13:08 
QuestionTrying to use ASP.NET Custom validator for conditional validation Pin
Member 104518047-Dec-13 13:06
Member 104518047-Dec-13 13:06 
Hello,

I have a radio button list control on my ASP.NET web form for selecting the payment method (Credit Card, Cheque or Cash),

And a credit card detail submission area for entering the credit card details if the user chose Credit Card as the payment method.
The credit card detail entering area has a radio button list control for selecting Credit Card type (AMEX, Master or VISA), a text box for entering the credit card number and a drop down list for selecting the credit card expiry month as shown below

ASP.NET
<!-- Radio button list control for selecting the payment method -->

<asp:RadioButtonList ID="rdPaymentMethod" runat="server">
     <asp:ListItem Value="CC"> Credit Card</asp:ListItem>
     <asp:ListItem Value="Cheque"> Cheque</asp:ListItem>
     <asp:ListItem Value="Cash"> Cash / Other</asp:ListItem>
</asp:RadioButtonList>


<!-- Credit card details entering area -->

<asp:RadioButtonList ID="rdCCType" runat="server">
     <asp:ListItem Value="AMEX"> American Express</asp:ListItem>
     <asp:ListItem Value="Master"> Master Card</asp:ListItem>
     <asp:ListItem Value="VISA"> VISA</asp:ListItem>
</asp:RadioButtonList>


<asp:TextBox ID="txtCCNumber" runat="server"></asp:TextBox>


<asp:DropDownList ID="ddlCCExpiryMonth" runat="server">
     <asp:ListItem Selected="True">Month</asp:ListItem>
     <asp:ListItem Value="01">01</asp:ListItem>
     <asp:ListItem Value="02">02</asp:ListItem>
     <asp:ListItem Value="03">03</asp:ListItem>
     <asp:ListItem Value="04">04</asp:ListItem>
     <asp:ListItem Value="05">05</asp:ListItem>
     <asp:ListItem Value="06">06</asp:ListItem>
     <asp:ListItem Value="07">07</asp:ListItem>
     <asp:ListItem Value="08">08</asp:ListItem>
     <asp:ListItem Value="09">09</asp:ListItem>
     <asp:ListItem Value="10">10</asp:ListItem>
     <asp:ListItem Value="11">11</asp:ListItem>
     <asp:ListItem Value="12">12</asp:ListItem>
</asp:DropDownList>


I am trying to validate my webform so that,

IF and ONLY IF the user select the first option (Credit Card) for payment type,

Then the user must ALSO select the credit card type (rdCCType), then enter credit card number (txtCCNumber) and also select credit card expiry month (ddlCCExpiryMonth)


I have absolutely no idea how to accomplish this and where to start.

Please show me how to do this using ASP.NET validation controls.

Thank you.
AnswerRe: Trying to use ASP.NET Custom validator for conditional validation Pin
jkirkerx7-Dec-13 13:38
professionaljkirkerx7-Dec-13 13:38 
AnswerRe: Trying to use ASP.NET Custom validator for conditional validation Pin
joginder-banger12-Dec-13 6:26
professionaljoginder-banger12-Dec-13 6:26 
QuestionSql and asp.net Pin
Otekpo Emmanuel7-Dec-13 11:28
Otekpo Emmanuel7-Dec-13 11:28 
AnswerRe: Sql and asp.net Pin
Mycroft Holmes7-Dec-13 12:39
professionalMycroft Holmes7-Dec-13 12:39 
GeneralRe: Sql and asp.net Pin
Otekpo Emmanuel9-Dec-13 12:13
Otekpo Emmanuel9-Dec-13 12:13 
GeneralRe: Sql and asp.net Pin
Mycroft Holmes9-Dec-13 13:01
professionalMycroft Holmes9-Dec-13 13:01 
GeneralRe: Sql and asp.net Pin
Otekpo Emmanuel10-Dec-13 11:01
Otekpo Emmanuel10-Dec-13 11:01 
GeneralSolved: Sql and asp.net Pin
Otekpo Emmanuel16-Dec-13 4:46
Otekpo Emmanuel16-Dec-13 4:46 
QuestionHow to catch up a HTML Control in code? Pin
Member 104545925-Dec-13 3:52
Member 104545925-Dec-13 3:52 
AnswerRe: How to catch up a HTML Control in code? Pin
thatraja5-Dec-13 4:20
professionalthatraja5-Dec-13 4:20 
GeneralRe: How to catch up a HTML Control in code? Pin
Member 104545925-Dec-13 4:32
Member 104545925-Dec-13 4:32 
GeneralRe: How to catch up a HTML Control in code? Pin
thatraja5-Dec-13 4:35
professionalthatraja5-Dec-13 4:35 
GeneralRe: How to catch up a HTML Control in code? Pin
Mycroft Holmes6-Dec-13 13:21
professionalMycroft Holmes6-Dec-13 13:21 
GeneralRe: How to catch up a HTML Control in code? Pin
Member 104545929-Dec-13 1:42
professionalMember 104545929-Dec-13 1:42 
GeneralRe: How to catch up a HTML Control in code? Pin
Member 104545929-Dec-13 1:43
professionalMember 104545929-Dec-13 1:43 
AnswerRe: How to catch up a HTML Control in code? Pin
ZurdoDev6-Dec-13 10:18
professionalZurdoDev6-Dec-13 10:18 
AnswerRe: How to catch up a HTML Control in code? Pin
Member 104513158-Dec-13 16:25
Member 104513158-Dec-13 16:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.