Click here to Skip to main content
15,888,461 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Sending SMS through ASP.NET Pin
Richard MacCutchan5-Sep-12 5:18
mveRichard MacCutchan5-Sep-12 5:18 
AnswerRe: Sending SMS through ASP.NET Pin
Rahul Rajat Singh16-Aug-12 18:17
professionalRahul Rajat Singh16-Aug-12 18:17 
AnswerRe: Sending SMS through ASP.NET Pin
ashjassi17-Aug-12 2:41
ashjassi17-Aug-12 2:41 
Question2010 web service Pin
dcof14-Aug-12 14:39
dcof14-Aug-12 14:39 
QuestionUnable to run the website using IIS Pin
sravsailu13-Aug-12 23:28
sravsailu13-Aug-12 23:28 
AnswerRe: Unable to run the website using IIS Pin
jkirkerx14-Aug-12 7:45
professionaljkirkerx14-Aug-12 7:45 
QuestionJQGRID IN ASP.NET Pin
Roshith G13-Aug-12 19:29
Roshith G13-Aug-12 19:29 
QuestionCustom Validator of Combobox and Validation summary Pin
Neha Ojha13-Aug-12 7:28
Neha Ojha13-Aug-12 7:28 
The following is the code for combobox along with its custom validator

<asp:ComboBox ID="cmbBusinessOwner" runat="server" MaxLength="0" DropDownStyle="DropDownList"
AutoCompleteMode="SuggestAppend">
<asp:ListItem Text="--Select--" Value="0" />
<asp:ListItem Text="HDFC Co-op" Value="1" />
<asp:ListItem Text="Limited Dividend Co-op" Value="2" />
<asp:ListItem Text="Rent Controlled" Value="3" />
<asp:ListItem Text="Rent Stablized" Value="4" />
<asp:ListItem Text="India" Value="5" />
<asp:ListItem Text="United" Value="6" />
<asp:ListItem Text="America" Value="7" />
<asp:ListItem Text="Mexico" Value="8" />
</asp:ComboBox>
<asp:CustomValidator ID="cvRequired" runat="server" ValidationGroup="Continue" ForeColor="Red"
ClientValidationFunction="cvComboBox_Validate" Text="Select Business Owner" Display="Dynamic"></asp:CustomValidator>

the script for cvComboBox_Validate function is

function cvComboBox_Validate(source, args) {
var ComboBoxCtrl = $find('cmbBusinessOwner');
if (ComboBoxCtrl.get_textBoxControl().value == "--Select--")
args.IsValid = false;
else
args.IsValid = true;
}

This code gives me the error message "Select Business Owner" next to the control on button click. But the message "Select Business Owner" fails to appear in validation summary.

My validation summary is as follows
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="false" EnableClientScript="true"
CssClass="validationsummary" ValidationGroup="Continue" DisplayMode="BulletList"
HeaderText="<div class='validationheader'>&nbsp;Please correct the following errors:</div>" />

Rest all the control on the page works fine except for this combobox.

Help will be greatly appreciated.

Thanks
AnswerRe: Custom Validator of Combobox and Validation summary Pin
jkirkerx14-Aug-12 7:59
professionaljkirkerx14-Aug-12 7:59 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
Neha Ojha15-Aug-12 5:09
Neha Ojha15-Aug-12 5:09 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
jkirkerx15-Aug-12 7:41
professionaljkirkerx15-Aug-12 7:41 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
Neha Ojha15-Aug-12 8:11
Neha Ojha15-Aug-12 8:11 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
jkirkerx15-Aug-12 10:54
professionaljkirkerx15-Aug-12 10:54 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
Neha Ojha21-Aug-12 4:06
Neha Ojha21-Aug-12 4:06 
GeneralRe: Custom Validator of Combobox and Validation summary Pin
jkirkerx21-Aug-12 10:27
professionaljkirkerx21-Aug-12 10:27 
QuestionASP.net Error [Solved] Pin
jojoba201113-Aug-12 3:24
jojoba201113-Aug-12 3:24 
AnswerRe: ASP.net Error [SOLVED] Pin
jojoba201113-Aug-12 18:35
jojoba201113-Aug-12 18:35 
QuestionServer Error in '/' Application Pin
Member 916988712-Aug-12 14:43
Member 916988712-Aug-12 14:43 
QuestionRe: Server Error in '/' Application Pin
Sandeep Mewara12-Aug-12 19:49
mveSandeep Mewara12-Aug-12 19:49 
AnswerRe: Server Error in '/' Application Pin
Member 916988712-Aug-12 22:36
Member 916988712-Aug-12 22:36 
GeneralRe: Server Error in '/' Application Pin
Eddy Vluggen12-Aug-12 23:11
professionalEddy Vluggen12-Aug-12 23:11 
GeneralRe: Server Error in '/' Application Pin
Vijay Selvaraj27-Aug-12 0:17
Vijay Selvaraj27-Aug-12 0:17 
GeneralRe: Server Error in '/' Application Pin
Eddy Vluggen27-Aug-12 0:21
professionalEddy Vluggen27-Aug-12 0:21 
Questionbring footer to bottom Pin
Jassim Rahma12-Aug-12 12:32
Jassim Rahma12-Aug-12 12:32 
QuestionGridview Pin
sravsailu12-Aug-12 6:17
sravsailu12-Aug-12 6:17 

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.