Question: I am looking for a way to get the content of the webpage using the url. For instance lets say when you go to www.example.com, you see the text "hello world". I want to get the text hello world in razor c#. 

In other words, I need a replacement of the following jquery code using c#:

```
$.post("www.example.com",{},function(data){
    useme(data);
})

```

Answer: 
```
var html = Html.Raw(new System.Net.WebClient().DownloadString("http://www.example.com"));

```

`Html.Raw` allows in parsing to HTML while a new instance of `WebClient` can help with directly fetching the string.
You can use the [WebClient class DownloadString](http://msdn.microsoft.com/en-us/library/ms144200%28v=vs.110%29.aspx) method to obtain the content of a remote page:

```
using (var client = new WebClient()){
    var response = client.DownloadString("http://www.example.com");
    // process response
}

```

If the response type is `text/plain`, you should get just "Hello World", but of the response type is `text/html`, you will need to parse out the text. You can use the [HtmlAgilityPack](http://htmlagilitypack.codeplex.com/) for that.