Thursday, March 18, 2010

SPOILERS!

http://tips.blogdoctor.me/2007/11/create-spoilers-in-blog-posts.html Used this link to have spoilers in one of my blogs.

Saturday, March 6, 2010

Import Excel Sheet into a .NET C# page

I got my idea from here
http://www.java2s.com/Code/ASP/ADO.net-Database/LoaddatafromExceldatasourceC.htm
It actually worked beautifully, I read it straight into a gridview now I can deal with the data normally

protected void Page_Load(object sender, EventArgs e)
{
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Book1.xls; Extended Properties=""Excel 8.0;HDR=Yes"";";
string CommandText = "select * from [Sheet1$]";

OleDbConnection myConnection = new OleDbConnection(ConnectionString);
OleDbCommand myCommand = new OleDbCommand(CommandText, myConnection);

myConnection.Open();

GridView1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
GridView1.DataBind();

myConnection.Close();
}

Friday, February 26, 2010

Allowing comments with custom themes on blogger

http://www.bloggerbuster.com/2008/06/how-to-add-comment-form-beneath-your.html

This really helped me with one of my blogs. I couldn't get my comments to work until I went to this.

Friday, January 8, 2010

ASP.NET TextBox Width compared to HTML INPUT

When converting an HTML input text box into an asp:TextBox , the HTML width will translate into Columns in ASP.NET
so in < input TYPE="TEXT" NAME="firm" VALUE="" size="60" MAXLENGTH="40" >
you will want your < asp:TextBox Columns = "60" ......