I am very new to csQuery and I am having a difficult time getting off the ground. The following is my simple asp.net controller. It is returning the following: $('.ng-scope').eq(0).find($('.ng-binding')).html(). The classes referenced do exist. Am I doing this right?
public class HomeController : Controller
{
ViewModel Vm = new ViewModel();
public ActionResult Index()
{
var url = "http://www.weather.com/weather/5day/l/08817:4:US";
var web = new WebClient();
web.Headers[HttpRequestHeader.UserAgent] = "Hello"; //in case they require it
var html = web.DownloadString(url);
CQ dom = html;
var x = dom["$('.ng-scope').eq(0).find($('.ng-binding')).html()"];
Vm.Day = x.Render();
return View(Vm);
}
}
@Model.Day
– spooky123 May 12 '15 at 02:45