I have a problem with C# ASP.NET ; I'm printing HTML to a page using C#. I tried using Labels and such, but it doesn't output the HTML as raw HTML, it just prints it with the actual <a href>
instead of raw HTML to create the link. Here's what I got.
string _consumerKey = "---";
string _consumerSecret = "---";
string _accessToken = "---";
string _accessTokenSecret = "---";
var server = new TwitterService(_consumerKey, _consumerSecret);
server.AuthenticateWith(_accessToken, _accessTokenSecret);
var tweets = server.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
foreach (var tweet in tweets)
{
Response.Write("<li><a href=\"http://twitter.com/" + tweet.User.ScreenName + " \">@" + tweet.User.ScreenName + "</a> says <<<< " + tweet.Text + " >>>></li>");
}
And it also prints the HTML at the top of the page instead of my <div id="tweetcontainer">
.
Here is the ASPNET Code. The Response.Write prints it to the top of the page instead of in the container.
<div id="tweetcontainer">
<asp:BulletedList ID="BulletedList1" runat="server">
</asp:BulletedList>
</div>