Click here to Skip to main content
15,916,293 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Generalto get the exact answer for the asp.net Pin
Member 1046157211-Dec-13 21:06
Member 1046157211-Dec-13 21:06 
GeneralRe: to get the exact answer for the asp.net Pin
Richard MacCutchan11-Dec-13 21:23
mveRichard MacCutchan11-Dec-13 21:23 
QuestionRe: to get the exact answer for the asp.net Pin
thatraja12-Dec-13 2:59
professionalthatraja12-Dec-13 2:59 
GeneralRe: to get the exact answer for the asp.net Pin
joginder-banger13-Dec-13 23:37
professionaljoginder-banger13-Dec-13 23:37 
GeneralAdding a row in ASP.Net when no records are selected using DetailsView Pin
wc211-Dec-13 5:09
wc211-Dec-13 5:09 
Questionvideo Conferencing in my web application Pin
Sanjeev991810-Dec-13 20:06
Sanjeev991810-Dec-13 20:06 
AnswerRe: video Conferencing in my web application Pin
Snehasish_Nandy10-Dec-13 23:30
professionalSnehasish_Nandy10-Dec-13 23:30 
QuestionWCF Pin
Neeraj Kumar10-Dec-13 1:33
Neeraj Kumar10-Dec-13 1:33 
AnswerRe: WCF Pin
David C# Hobbyist.10-Dec-13 12:29
professionalDavid C# Hobbyist.10-Dec-13 12:29 
AnswerRe: WCF Pin
Abhinav S10-Dec-13 16:35
Abhinav S10-Dec-13 16:35 
QuestionDeveloped an ASP .NET site, need to make it to work on Mobile device Pin
Rockstar_9-Dec-13 22:12
professionalRockstar_9-Dec-13 22:12 
AnswerRe: Developed an ASP .NET site, need to make it to work on Mobile device Pin
Abhinav S10-Dec-13 16:36
Abhinav S10-Dec-13 16:36 
QuestionI want a clariffication on Asp.Net Pin
Member 103745539-Dec-13 17:57
Member 103745539-Dec-13 17:57 
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 

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.