I am working in site that publish the content by date so, every Thursday I will compare the date that the content approved to this Thursday date if its the same date (dependent on admin diction to publish or leave it for next week) if its smaller it will publish auto, if its bigger it will not publish

thats what i can write

  public ActionResult PublishStatus(DateTime ApprovedDate)
        var Approved = new AprrovedDate;
        if (Approved == DateTime.Now)
            return View(adminview);
        else if (Approved >= DateTime.Now)
            return View();
            return View();

noted the approved date taken from list in the share-point

  • It's really hard to say what you want. Please add some more info. Is this an On-Premise app? If you are trying to publish something, why are you returning a View? What does that View do? – LeonidasFett Feb 5 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.