public ActionResult FindUser(int?id, [Bind(Include = "ResponseTipTaskID,twitterUserNameSelected")] ResponseTipTask responseTipTaskChanged)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ResponseTipTask responseTipTask = db.ResponseTipTasks.Find(id);

            if (responseTipTask == null)
            {
                return(HttpNotFound());
            }
            responseTipTask.twitterUserNameSelected = responseTipTaskChanged.twitterUserNameSelected;
            if (responseTipTask.twitterUserNameSelected != null)
            {
                db.SaveChanges();
                ResponseTipTask responseTipTasktest = db.ResponseTipTasks.Find(id);
                return(RedirectToAction("Create"));
            }
            //            return RedirectToAction("FindUser", new { id = responseTipTask.ResponseTipTaskID });
            //            ViewBag.SearchResultsInBag = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            UserSearchResults = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            return(View(responseTipTask));
            //           return View();
        }
        /*       public ActionResult GetImg()
         *     {
         *
         *         var srcImage = Image.FromFile(imageFile);
         *         using (var streak = new MemoryStream())
         *         {
         *             srcImage.Save(streak, ImageFormat.Png);
         *             return File(streak.ToArray(), "image/png");
         *         }
         *     }*/

        //GET: ResponseTipTasks
        public ActionResult FindUser(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ResponseTipTask responseTipTask = db.ResponseTipTasks.Find(id);

            if (responseTipTask == null)
            {
                return(HttpNotFound());
            }
            //            Debug.WriteLine("taskcontroller: FindUser");
            //            TwitterHandling.TwitterHandlingClass.PublishTweet("hello " + responseTipTask.twitterUserNameWritten);
            //            UserSearchResults= TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            UserSearchResults = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            //ViewBag.SearchResultsInBag = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            ViewBag.SearchResultsInBag = UserSearchResults;
            return(View(responseTipTask));
        }
 public ActionResult FindUser(int? id,[Bind(Include = "ResponseTipTaskID,twitterUserNameSelected")] ResponseTipTask responseTipTaskChanged)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     ResponseTipTask responseTipTask = db.ResponseTipTasks.Find(id);
     if (responseTipTask == null)
     {
         return HttpNotFound();
     }
     responseTipTask.twitterUserNameSelected = responseTipTaskChanged.twitterUserNameSelected;
     if (responseTipTask.twitterUserNameSelected!=null)
     {
         db.SaveChanges();
         ResponseTipTask responseTipTasktest = db.ResponseTipTasks.Find(id);
         return RedirectToAction("Create");
     }
     //            return RedirectToAction("FindUser", new { id = responseTipTask.ResponseTipTaskID });
     //            ViewBag.SearchResultsInBag = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
     UserSearchResults = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
     return View(responseTipTask);
      //           return View();
 }
        /*       public ActionResult GetImg()
        {

            var srcImage = Image.FromFile(imageFile);
            using (var streak = new MemoryStream())
            {
                srcImage.Save(streak, ImageFormat.Png);
                return File(streak.ToArray(), "image/png");
            }
        }*/
        //GET: ResponseTipTasks
        public ActionResult FindUser(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            ResponseTipTask responseTipTask = db.ResponseTipTasks.Find(id);
            if (responseTipTask == null)
            {
                return HttpNotFound();
            }
            //            Debug.WriteLine("taskcontroller: FindUser");
            //            TwitterHandling.TwitterHandlingClass.PublishTweet("hello " + responseTipTask.twitterUserNameWritten);
            //            UserSearchResults= TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            UserSearchResults = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            //ViewBag.SearchResultsInBag = TwitterHandling.TwitterHandlingClass.SearchUsersM(responseTipTask.twitterUserNameWritten);
            ViewBag.SearchResultsInBag = UserSearchResults;
            return View(responseTipTask);
        }