Click here to Skip to main content
15,885,244 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine18-Dec-12 18:03
lhsunshine18-Dec-12 18:03 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine18-Dec-12 19:18
lhsunshine18-Dec-12 19:18 
GeneralRe: Adding a flash webcam photo capture Pin
Eddy Vluggen18-Dec-12 20:40
professionalEddy Vluggen18-Dec-12 20:40 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine19-Dec-12 2:28
lhsunshine19-Dec-12 2:28 
QuestionMessage Removed Pin
16-Dec-12 7:11
watercoldworld16-Dec-12 7:11 
QuestionSplitting a url Pin
El Dev14-Dec-12 22:02
El Dev14-Dec-12 22:02 
Questionpulling across value from list to display in view Pin
xnaLearner14-Dec-12 5:58
xnaLearner14-Dec-12 5:58 
AnswerRe: pulling across value from list to display in view Pin
xnaLearner14-Dec-12 6:49
xnaLearner14-Dec-12 6:49 
Im now using
HTML
bool isFirst = true;
@int remainingHolidays = 0;

@foreach (var item in Model.HList4DD)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.PersonId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.HolidayDate)
        </td>
   

   if (isFirst)
   {
      remainingHolidays = item.Person.HolidaysRemaining;
      isFirst = false;
   }
        
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Id })
        </td>
    </tr>}
        
    
    <tr>
      <div class="editor-label">
         @*   @Html.LabelFor(model => model.PList4DD, "Person")*@
        </div>

        <div class="editor-field">
       
             <form action ="/Holidays/Index" id="some" method="post"> 

            @* *WORKING VERSION**@ @Html.DropDownListFor(model => model.HList4DD.First().HolidayDate, new SelectList(Model.PList4DD, "Id", "Name", Model.currentPersonID), "--select--")
        

       <script>
           function updateFormEnabled() 
           {
               if (verifyAdSettings()) 
               {
                   $('#sbmt').removeAttr('disabled');
               }
               else 
               {
                   $('#sbmt').attr('disabled', 'disabled');
               }
           }

           function verifyAdSettings() 
           {
               if ($('#HolidayDate').val() != '') 
               {
                   return true;

               }
               else 
               {
                   return false;
               }
           }


           $('#HolidayDate').change(updateFormEnabled);         
           </script>

      <td>
      @remainingHolidays.ToString()
   </td>
               
             <input type="submit" id= "sbmt" name="ViewHolidaysDD" value="View"/>
              </form>
         
  <script>
      $('#sbmt').attr('disabled', '');
        </script>

</table>



the @remainingHolidays.ToString() 5 lines or so up from the bottom is saying it doesnt exist in the current context?
AnswerRe: pulling across value from list to display in view Pin
David C# Hobbyist.14-Dec-12 17:41
professionalDavid C# Hobbyist.14-Dec-12 17:41 
GeneralRe: pulling across value from list to display in view Pin
xnaLearner15-Dec-12 8:28
xnaLearner15-Dec-12 8:28 
QuestionMessage Removed Pin
13-Dec-12 5:57
xnaLearner13-Dec-12 5:57 
Questionproblem with relationships Pin
xnaLearner13-Dec-12 2:45
xnaLearner13-Dec-12 2:45 
AnswerRe: problem with relationships Pin
Richard Deeming13-Dec-12 3:48
mveRichard Deeming13-Dec-12 3:48 
GeneralRe: problem with relationships Pin
xnaLearner13-Dec-12 4:37
xnaLearner13-Dec-12 4:37 
Question[VB.NET 2008] DataSet and XML files Pin
steve_949661313-Dec-12 0:06
professionalsteve_949661313-Dec-12 0:06 
AnswerRe: [VB.NET 2008] DataSet and XML files Pin
Eddy Vluggen13-Dec-12 4:28
professionalEddy Vluggen13-Dec-12 4:28 
GeneralRe: [VB.NET 2008] DataSet and XML files Pin
steve_949661313-Dec-12 21:21
professionalsteve_949661313-Dec-12 21:21 
GeneralRe: [VB.NET 2008] DataSet and XML files Pin
Eddy Vluggen14-Dec-12 0:34
professionalEddy Vluggen14-Dec-12 0:34 
QuestionAssembly with different .NET framework versions Pin
marca29212-Dec-12 10:05
marca29212-Dec-12 10:05 
AnswerRe: Assembly with different .NET framework versions Pin
Gerry Schmitz12-Dec-12 12:25
mveGerry Schmitz12-Dec-12 12:25 
QuestionUse A Cookie To Send PersonID To Different Page Pin
xnaLearner12-Dec-12 4:33
xnaLearner12-Dec-12 4:33 
Questiondont allow user to select existing date Pin
xnaLearner10-Dec-12 5:46
xnaLearner10-Dec-12 5:46 
AnswerRe: dont allow user to select existing date Pin
Pete O'Hanlon10-Dec-12 5:53
mvePete O'Hanlon10-Dec-12 5:53 
GeneralRe: dont allow user to select existing date Pin
xnaLearner10-Dec-12 6:23
xnaLearner10-Dec-12 6:23 
GeneralRe: dont allow user to select existing date Pin
xnaLearner10-Dec-12 23:26
xnaLearner10-Dec-12 23:26 

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.