Skip to content

Instantly share code, notes, and snippets.

@mrobers1982
Created January 12, 2012 10:23
Show Gist options
  • Save mrobers1982/1599722 to your computer and use it in GitHub Desktop.
Save mrobers1982/1599722 to your computer and use it in GitHub Desktop.
.NET bootstrap html example
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication1._default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=bootstrap_html %>
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Text;
namespace WebApplication1
{
public partial class _default : System.Web.UI.Page
{
public String bootstrap_html = "";
private String article_id = "http://www.tennis.com/articles/templates/features.aspx?articleid=15703";
protected void Page_Load(object sender, EventArgs e)
{
WebClient client = new System.Net.WebClient();
String b64_encoded_aid = System.Convert.ToBase64String(Encoding.ASCII.GetBytes(article_id));
bootstrap_html = client.DownloadString(String.Format("http://bootstrap.livefyre.com/api/v1.1/public/bootstrap/html/291399/{0}.html?allow_comments=true", b64_encoded_aid));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment