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
Tuesday, July 13, 2010
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;
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
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);
}
}
{
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
http://scottonwriting.net/sowblog/posts/10039.aspx
Thursday, April 29, 2010
Sunday, April 4, 2010
Thursday, March 18, 2010
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).
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).
Tuesday, May 5, 2009
Rename MSSQL Server Database Name
ERROR: The database could not be exclusively locked to perform the operation.
SOLUTION:
ALTER DATABASE SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
SP_RENAMEDB,
Go
ALTER DATABASE SET MULTI_USER -- set back to multi user
GO
SOLUTION:
ALTER DATABASE
GO
SP_RENAMEDB
Go
ALTER DATABASE
GO
Subscribe to:
Posts (Atom)