Click here to Skip to main content
15,040,090 members
Home / Discussions / Web Development
   

Web Development

 
QuestionRe: how i use datepicker in mvc 5? [moved] Pin
ZurdoDev11-Nov-14 5:25
professionalZurdoDev11-Nov-14 5:25 
QuestionRemoteApp: unable to create files in Program folder Pin
Leif Simon Goodwin10-Nov-14 5:36
mvaLeif Simon Goodwin10-Nov-14 5:36 
QuestionAT commands in php Pin
Member 112179068-Nov-14 12:45
MemberMember 112179068-Nov-14 12:45 
QuestionSOLVED: RD Web and Windows Server 2012 R2 Pin
Leif Simon Goodwin6-Nov-14 22:27
mvaLeif Simon Goodwin6-Nov-14 22:27 
Questionwebsite Pin
Member 112090785-Nov-14 4:14
MemberMember 112090785-Nov-14 4:14 
SuggestionRe: website Pin
ZurdoDev5-Nov-14 5:15
professionalZurdoDev5-Nov-14 5:15 
AnswerRe: website Pin
Dominic Burford7-Nov-14 4:57
professionalDominic Burford7-Nov-14 4:57 
QuestionMVC5: DropdownlistFor: How to handle empty data Pin
NarVish4-Nov-14 23:26
MemberNarVish4-Nov-14 23:26 
Hi,

I created dropdownlist in my view and controller as below. If ViewBag.CategoryList is null, it is throwing exception. how to handle the exception. Please guide me. Thank you.

<div class="span3">@Html.DropDownListFor(m => m.Category, (IEnumerable<SelectListItem>)ViewBag.CategoryList)</div>


Code is:
DataTable dt = registrationDAO.GetParameters("PSTND");

List<SelectListItem> positions = new List<SelectListItem>();
foreach (DataRow dr in dt.Rows)
{
     positions.Add(new SelectListItem { Text = dr["PARAM_VALUE"].ToString() });
}
ViewBag.CategoryList = positions;

QuestionMVC 4.5 Noobie Question Pin
Kevin Marois3-Nov-14 19:21
professionalKevin Marois3-Nov-14 19:21 
AnswerRe: MVC 4.5 Noobie Question Pin
Matt U.4-Nov-14 6:53
MemberMatt U.4-Nov-14 6:53 
AnswerRe: MVC 4.5 Noobie Question Pin
Anurag Gandhi30-Nov-14 23:01
professionalAnurag Gandhi30-Nov-14 23:01 
QuestionTHE IMAGE IS NOT DISPLAY CROOS MARK APPEARS ON WEBPAGE Pin
Member 112021843-Nov-14 19:07
MemberMember 112021843-Nov-14 19:07 
SuggestionRe: THE IMAGE IS NOT DISPLAY CROOS MARK APPEARS ON WEBPAGE Pin
Richard MacCutchan3-Nov-14 21:29
mveRichard MacCutchan3-Nov-14 21:29 
AnswerRe: THE IMAGE IS NOT DISPLAY CROOS MARK APPEARS ON WEBPAGE Pin
ZurdoDev4-Nov-14 8:21
professionalZurdoDev4-Nov-14 8:21 
QuestionCSS Problem Pin
Kevin Marois3-Nov-14 10:41
professionalKevin Marois3-Nov-14 10:41 
AnswerRe: CSS Problem Pin
Richard Deeming3-Nov-14 11:30
mveRichard Deeming3-Nov-14 11:30 
GeneralRe: CSS Problem Pin
Kevin Marois3-Nov-14 11:49
professionalKevin Marois3-Nov-14 11:49 
AnswerRe: CSS Problem Pin
Kornfeld Eliyahu Peter3-Nov-14 21:10
professionalKornfeld Eliyahu Peter3-Nov-14 21:10 
GeneralRe: CSS Problem Pin
Richard Deeming3-Nov-14 23:19
mveRichard Deeming3-Nov-14 23:19 
QuestionASP.Net MVC 5 - First Project Error Pin
Kevin Marois3-Nov-14 5:51
professionalKevin Marois3-Nov-14 5:51 
AnswerRe: ASP.Net MVC 5 - First Project Error Pin
Kevin Marois3-Nov-14 6:02
professionalKevin Marois3-Nov-14 6:02 
GeneralHandlings rows in Datatables Pin
adekunbi29-Oct-14 3:43
Memberadekunbi29-Oct-14 3:43 
SuggestionRe: Handlings rows in Datatables Pin
ZurdoDev29-Oct-14 5:46
professionalZurdoDev29-Oct-14 5:46 
GeneralRe: Handlings rows in Datatables Pin
adekunbi29-Oct-14 6:01
Memberadekunbi29-Oct-14 6:01 
GeneralRe: Handlings rows in Datatables Pin
ZurdoDev29-Oct-14 6:04
professionalZurdoDev29-Oct-14 6:04 

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.