It shows(among other details) the sequence of page events and time that took each event to execute.
However you can’t request the same trace facility for user control events. You have to insert your own Trace.WriteLine (or similar) statements, which is quite annoying. I’ve posted the suggestion to MS Feedback site
, but they do not want to implement it.
ASP.NET Page Life Cycle Overview (and quick sheet)
A reference to the GridView can be obtained by using gridViewRow.Parent.Parent or (GridView) gridViewRow.NamingContainer(quote from here).
So I’ve created the static function:
public static GridView GetParentGridView(GridViewRow row)
//NOTE row.Parent doesn’t return GridView
GridView gridView = (GridView)row.NamingContainer;
But you can’t select the page object in Design view to specify events in Properties.
In code-behind pages that use C#, because the control name will not appear in the drop-down list.
It seems that C# event handler for page can be created only manually!?
According to VS2008 help, the new version has no improvement in this area.
Why C# editor doesn’t have control drop-down list on the left top corner, as VB editor has?
Math.Max Method doesn’t have overload for DateTime
So I’ve created
public static DateTime Min(DateTime t1, DateTime t2)
if (DateTime.Compare(t1, t2) > 0)
public static DateTime Max(DateTime t1, DateTime t2)
if (DateTime.Compare(t1, t2) < 0)
I’ve noticed that some pages on our site were opened from my home computer with huge delay –more than 30sec, but others- almost instantly.
The problem was with pages that use HTTPS(SSL protocol). It seams that my internet provider had performance problem, but it had huge impact on pages that was opened using SSL.
In the normal development/test environment we never noticed the problem, but it could be a big issue for users with low bandwidth.
We need to redesign our application to use https protocol only for a few pages, that work with passwords and credit cards. It also will help with annoying messages: “The page has both secure and un-secure sections”
There are a few related links :
When I added a new Master page in Visual Studio 2005, named as MyApp.Master, the generated class was named just MyApp.
I’ve already have a namespace with the same name MyApp, and it caused the compiler errors.
It will be good if new file wizard by default create class names, that include the type of generated object, e.g. MyAppMaster class.
Similar should be apply for other ASP.NET objects, e.g. Customer.aspx page should use CustomerPage class, and Customer.ascx user control should use CustomerUsc class.
The elem.innerText property is an IE proprietary addition and thus not usually supported by other browsers. Instead you should be getting the “inner text” of the cell using something like the following:
This uses W3C DOM compliant properties to retrieve the text value of the first TextNode of the cell. This makes it more likely to work across browsers.
Width in IE and Firefox treated differently.
According to standard
(that FireFox follows), content width is set excluding paddings and border(see figure there
“The size of the box is the sum of the element width (i.e. formatted text or image) and the padding, the border and the margin areas”.
But in IE the width of the box is the width of the content plus any border or padding.
In other words:
width(IE)=”padding-left”+”border-left”+ width(FF) + “padding-right”+”border–right”.
To make IE to follow standard can be done by specifying
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0//EN”>
Unfortunately, this change will have MAJOR impact on existing web site. In our application we effectively have one page with different user controls loaded dynamically, so the change will effect everything -too risky.
Class and ID Names are Case Sensitive in FireFox