Click here to Skip to main content
14,934,895 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Unable to cast object of type 'System.DBNull' to type 'System.String'. Pin
samflex19-Sep-17 9:17
Membersamflex19-Sep-17 9:17 
QuestionDot Net Core 1.1 Static files(css,fonts,js) are not getting loaded when I am deploying my site in a Sub Domain Pin
IncodeSolutions18-Sep-17 19:58
MemberIncodeSolutions18-Sep-17 19:58 
QuestionNeed a article on repository and data access code unit testing Pin
Mou_kol17-Sep-17 22:54
MemberMou_kol17-Sep-17 22:54 
AnswerRe: Need a article on repository and data access code unit testing Pin
F-ES Sitecore18-Sep-17 0:07
mveF-ES Sitecore18-Sep-17 0:07 
PraiseRe: Need a article on repository and data access code unit testing Pin
Mou_kol19-Sep-17 23:56
MemberMou_kol19-Sep-17 23:56 
Questionvb.net 2010 web form app point to correct .net framework Pin
dcof15-Sep-17 14:49
Memberdcof15-Sep-17 14:49 
QuestionAdding API's to website Pin
Member 1271965814-Sep-17 10:35
MemberMember 1271965814-Sep-17 10:35 
QuestionHow do I handle nulls in RadioButtonList in Repeater? Pin
samflex13-Sep-17 9:50
Membersamflex13-Sep-17 9:50 
Greetings again.

I have this:

sp:RadioButtonList ID="rdlmhorsepType" Text='<%#Eval("horsepType").ToString()%>' runat="server" ValidationGroup ="stype" RepeatDirection="Horizontal" TextAlign="Right" style="display:inline;"  AutoPostBack="true" OnSelectedIndexChanged="horsepType_SelectedIndexChanged">
  <asp:ListItem Text="Electric" />
  <asp:ListItem Text="Recoil" />
</asp:RadioButtonList><br />


When a user enters his/her account number, if there is data associated with that account number, it populates a repeater form.

This part works fine.

The issue is that if no data is associated with that account number, I get the following error:

'horsepType' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

In other words, if RadioButtonList is null, it throws that error.

I have several of those on my Repeater control.

Any ideas how to resolve this?

Thanks a lot in advance
AnswerRe: How do I handle nulls in RadioButtonList in Repeater? Pin
Kornfeld Eliyahu Peter13-Sep-17 10:29
professionalKornfeld Eliyahu Peter13-Sep-17 10:29 
GeneralRe: How do I handle nulls in RadioButtonList in Repeater? Pin
samflex13-Sep-17 11:04
Membersamflex13-Sep-17 11:04 
AnswerRe: How do I handle nulls in RadioButtonList in Repeater? Pin
Richard Deeming14-Sep-17 1:51
mveRichard Deeming14-Sep-17 1:51 
GeneralRe: How do I handle nulls in RadioButtonList in Repeater? Pin
samflex14-Sep-17 3:58
Membersamflex14-Sep-17 3:58 
QuestionAny utilities for replicating Web Site files through intermediary drop into web site testing location. Pin
Blake Miller6-Sep-17 12:27
MemberBlake Miller6-Sep-17 12:27 
Questionusing asp.net c# Pin
Member 133738734-Sep-17 18:58
MemberMember 133738734-Sep-17 18:58 
AnswerRe: using asp.net c# Pin
User 418025418-Sep-17 3:21
MemberUser 418025418-Sep-17 3:21 
QuestionHttp to Https URL rewriting Pin
Member 1129085529-Aug-17 2:37
MemberMember 1129085529-Aug-17 2:37 
AnswerRe: Http to Https URL rewriting Pin
A_Griffin29-Aug-17 3:36
MemberA_Griffin29-Aug-17 3:36 
GeneralRe: Http to Https URL rewriting Pin
Member 1129085530-Aug-17 1:40
MemberMember 1129085530-Aug-17 1:40 
GeneralRe: Http to Https URL rewriting Pin
Nathan Minier13-Sep-17 2:04
professionalNathan Minier13-Sep-17 2:04 
QuestionFile Upload and Export option with VS 2015 Pin
netbrain software28-Aug-17 23:00
Membernetbrain software28-Aug-17 23:00 
AnswerRe: File Upload and Export option with VS 2015 Pin
A_Griffin29-Aug-17 0:17
MemberA_Griffin29-Aug-17 0:17 
AnswerRe: File Upload and Export option with VS 2015 Pin
netbrain software29-Aug-17 20:58
Membernetbrain software29-Aug-17 20:58 
QuestionGridview with checkboxes Pin
Michael Clinton28-Aug-17 12:52
MemberMichael Clinton28-Aug-17 12:52 
Questionregarding asp.net Pin
Member 1337387327-Aug-17 20:58
MemberMember 1337387327-Aug-17 20:58 
AnswerRe: regarding asp.net Pin
Member 1326737028-Aug-17 21:22
MemberMember 1326737028-Aug-17 21:22 

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.