Wednesday, July 28, 2010

Java and C# Comparison

http://www.harding.edu/fmccown/java_csharp_comparison.html
Java and C# Comparison

Tuesday, July 13, 2010

Automatic Redirect Page Using HTML

HEAD
META HTTP-EQUIV="refresh" CONTENT="5;URL=http://www.google.com/"
End HEAD
Your browser should automatically take you there in 5 seconds.
If it doesn't please go to http://www.google.com

Thursday, July 1, 2010

Getting Gridview Row Index in Row Command Event

GridViewRow rowSelect = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);
int i = rowSelect.RowIndex;

OR

GridViewRow rowSelect = ((ImageButton)sender).Parent.Parent as GridViewRow;
int i = rowSelect.RowIndex;

OR

Bind in Button CommandArgument
((GridViewRow) Container).RowIndex

OR
GridView Row index by control
CheckBox chkBox = (CheckBox) sender;
GridViewRow gRow = (GridViewRow)chkBox.NamingContainer;

Monday, June 14, 2010

Export ASP.Net GridView to PDF and XLS using iTextSharp

http://www.aspsnippets.com/Articles/Export-ASP.Net-GridView-to-PDF-with-Custom-Columns-Widths-using-iTextSharp.aspx

http://sourceforge.net/projects/itextsharp/

Adding Custom Header in Gridview

protected void gViewEdit_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
GridView gView = (GridView)sender;
GridViewRow gViewRow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert);
TableCell tblCell = new TableCell();
tblCell.Text = "Admission Report";
tblCell.ColumnSpan = 13;
tblCell.HorizontalAlign = HorizontalAlign.Center;
tblCell.Font.Size = 16;
tblCell.Font.Bold = true;
gViewRow.Cells.Add(tblCell);
gView.Controls[0].Controls.AddAt(0, gViewRow);
}
}

Wednesday, May 5, 2010

CheckBoxList Validator

An ASP.NET 2.0 Validator Web Control for CheckBoxes and CheckBoxLists
http://scottonwriting.net/sowblog/posts/10039.aspx

Wednesday, July 1, 2009

Can’t Play Flv files from Windows 2003 Server

Steps To Follow.

1. Open the site to configure in IIS. Right click and select "Properties"
2. Click the HTTP Headers Tab, select “File Types” under the MIME Map section, and then click "New Type". Enter the following:
1. Associated Extension box: .flv
2. MIME Type box: flv-application/octet-stream
3. Click "OK" and close the IIS Properties box
4. You may need to restart IIS( start->run->iisreset).