Read this excellent guide on increasing the total memory Visual Studio can use, even in 32bit windows
Related Reading: JavaScript: The Good Parts Head First Java, 2nd Edition Effective Java (2nd Edition)
Here is a code snippet that will COMPLETELY disable ViewState and ControlState.
Please note, if you want to disable viewstate, you can set “EnableViewState” to false for the page, however you will still see “VIEWSTATE” in the page. The reason for that is because the hidden ViewState HTML field also contains “Control State”, which is [...]
I think this is a classic post that everyone should read:
The Most Useful .NET Utility Classes Developers Tend To Reinvent Rather Than Reuse
Related Reading: JavaScript: The Good Parts Head First Java, 2nd Edition Effective Java (2nd Edition)
If you read Creating SqlParameters Best Practices you will find the fun you have if you have null values:
SqlParameter[] sqlParams = new SqlParameter[] { new SqlParameter("@Required", required), questionCode == null ? new SqlParameter("@Code", DBNull.Value) : new SqlParameter("@Code", questionCode) };
Here is a nice helper function to deal with nulls without having to manually [...]
Here is a list of new features in ASP.NET 4.0.
Very interesting. Auto start feature, new ways to choose where data is cached, built in option for compression session (via gzip), and more!
Related Reading: JavaScript: The Good Parts Head First Java, 2nd Edition Effective [...]
Wow, sweet. Use .NET 3.5 features in .NET 2.0.
A quick overview how to do it.
1. Edit your .CSPROJ file and manually add another reference to System.Core
Add a True
This will make the compiler copy it to the BIN folder.
Thats it. You can now use .NET 3.5 features
[...]
When using SQL Server Management Studio you might want to copy data from one DB to another (using just a SELECT and INSERT statement)
It’s so easy you won’t believe it
sp_addlinkedserver @server='192.168.123.456', @provider='SQLNCLI', @srvproduct='',@provstr='User Id=sa; Password=are-you-crazy-to-use-sa' insert into [192.168.123.456].MYDB.dbo.tblRecords select * from MYDB.dbo.tblRecords
and when you are done
sp_dropserver [192.168.123.456]
References:
sp_addlinkedserver [...]
hnc.cgi is a spam script. Its also known as dm.cgi.
If you have this script running, chances are your server has been exploited.
Here is the actual dm.cgi script if you want to see it.
Related Reading: JavaScript: The Good Parts Head First Java, 2nd Edition [...]
Before and After
If you manually want to simulate a postback, Here is how you would stick together a string manually calling __doPostBack in .NET 1.1
In this case its making a link in a particular linkbutton control inside a datagrid.
__doPostBack in .NET 1.0
string link = "<a href=\"javascript:__doPostBack('dataGridCart$_ctl" + i + "$linkButton','');\""; [...]
This is quite an astonishing use of Google Trends. Google realized that when people get sick they (obviously) search for flu related keywords and they managed to find a correlation to actual published flu infection statistics. Quite amazing and this is definately a unique and interesting application of technology.
-
Articles
- January 2011
- April 2010
- March 2010
- February 2010
- January 2010
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- February 2009
- December 2008
- November 2008
- October 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
-
Calendar
February 2012 M T W T F S S « Jan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 -
Meta
