Palermo4
J. Michael Palermo IV
Sign in
|
Join
Home
Contact
About
RSS
Atom
Comments RSS
Search
Tags
.net
.netrocks
ado.net
ajax
americanidol
announcement
apple
apply
asp.net
aspinsiders
author
azgroups
biztalk
blog
book
c#
cardspace
cisco
code
commentary
Community News
coveys7habits
css3
defrag
desertcodecamp
devdays
diet
download
dreamscene
ebay
eWallet
extensionmethods
firebug
firefox
gadget
General Software Development
gmail
google
gotcodesnippets.net
gtd
html
html5
interface
jaiku
javascript
jott.com
live
live.com
livewriter
mac
mesh
mindmanager
mix
motorola-q
mouse wheel
msi
mvp
mvpsummit
narrative
net
nmug
onecare
open space
orcsweb
palermo4.com
partywithpalermo
pdc
personal
primecondition.com
question
rd
reference
regex
sharepoint
silverlight
silverlightusergroup
snagit
soliloquy
sqlserver
statera
sync
teched
techfest
themomentoftruth
theregion.com
troubleshooting
twitter
vault
video
vista
visualbasic
visualstudio2003
visualstudio2005
visualstudio2008
vpc
windows meeting space
wpc
wpf
xaml
xml
News
Navigation
Home
Blogs
Archives
April 2013 (1)
February 2013 (2)
November 2012 (2)
September 2012 (1)
July 2012 (1)
February 2012 (1)
January 2012 (2)
November 2011 (2)
October 2011 (1)
August 2011 (2)
July 2011 (1)
June 2011 (2)
April 2011 (2)
December 2009 (1)
April 2009 (1)
January 2009 (1)
June 2008 (3)
April 2008 (11)
March 2008 (9)
February 2008 (7)
January 2008 (12)
December 2007 (8)
November 2007 (4)
October 2007 (9)
September 2007 (2)
August 2007 (8)
July 2007 (33)
June 2007 (1)
April 2007 (5)
March 2007 (2)
February 2007 (6)
January 2007 (4)
December 2006 (7)
November 2006 (7)
October 2006 (10)
September 2006 (1)
August 2006 (4)
July 2006 (1)
June 2006 (2)
May 2006 (3)
April 2006 (2)
March 2006 (8)
February 2006 (7)
January 2006 (1)
December 2005 (2)
October 2005 (1)
September 2005 (3)
August 2005 (6)
June 2005 (7)
March 2005 (2)
February 2005 (3)
January 2005 (3)
December 2004 (1)
November 2004 (4)
October 2004 (5)
August 2004 (1)
July 2004 (3)
June 2004 (9)
May 2004 (15)
April 2004 (7)
March 2004 (1)
February 2004 (2)
January 2004 (1)
Sites
Palermo4.com
Palermo4 on MSDN
Browse by Tags
All Tags
»
code
(
RSS
)
.net
ado.net
ajax
asp.net
c#
extensionmethods
javascript
narrative
reference
teched
visualbasic
visualstudio2003
visualstudio2008
HttpRequest Using IsAjax & IsJson Extension Methods
by
Palermo4
Although the ScriptManager has a property named IsInAsyncPostBack to determine an AJAX call, the control is scoped to the page it is contained in. If writing code in a custom HTTP module, what if I need to know in the BeginRequest event whether the current...
Filed under:
.net
,
asp.net
,
c#
,
ajax
,
code
,
visualstudio2008
,
extensionmethods
How To: Access Underlying Data of the ObjectDataSource
by
Palermo4
A gentleman in my ASP.NET 2.0 class a while ago asked me how to access the underlying object used for the ObjectDataSource control. Suppose you have some code in App_Code like so: public class DataManager { public DataSet SelectDataSet() { // code that...
Filed under:
.net
,
asp.net
,
c#
,
code
,
ado.net
Revision: Get the Value of a Control Without an Instance of the Control
by
Palermo4
On an earlier post, I provided code that would retrieve the value of a control from the HTTP post without the need for an instance of the control . With good feedback, I made some modifications as follows: public static string GetControlValueFromRequest...
Filed under:
.net
,
asp.net
,
c#
,
code
Revision: Case-Insensitive String Equality
by
Palermo4
I made revisions to my method for comparing strings while ignoring case . This is in light of some good feedback I received. Here is the updated method: public static bool AreEqualIgnoreCase( string firstString, string secondString) { // if references...
Filed under:
.net
,
c#
,
code
To Compile or Not Compile
by
Palermo4
ASP.NET 2.0 allows developers to configure whether a page compiles or not. Consider the following page directive: <% @ Page Language ="C#" CompilationMode ="Never" %> Setting the CompilationMode attribute to Never will disallow code on the page...
Filed under:
.net
,
asp.net
,
code
How To: Create a Strongly-Typed Property For HttpContext.Items
by
Palermo4
HttpContext.Items is one of my favorite properties in ASP.NET. If I want to communicate a value from the HTTP pipeline to a page and then to a user control, this is my method for doing so. Because the Items property is an implementation of IDictionary...
Filed under:
.net
,
asp.net
,
c#
,
code
How To: "Upsert" Into AppSettings
by
Palermo4
ASP.NET 2.0 allows developers to update or insert values into web.config programmatically. This allows senior ASP.NET developers to create an administration or support page to modify values into web.config sections - without tampering with the web.config...
Filed under:
.net
,
asp.net
,
c#
,
code
How To: Obtain Method Name Programmatically For Tracing
by
Palermo4
I am not a fan of hard-coding method names in exception or trace messages. Here is a utility method to allow access to method name at runtime: public static void TraceContext( string messageFormat) { Trace .WriteLine( string .Format(messageFormat, new...
Filed under:
.net
,
asp.net
,
c#
,
code
How To: Return Embedded Resource Content As String
by
Palermo4
Here is a utility method for returning any embedded resource content as a string: public static partial class Tools { public static string GetEmbeddedContent( string resourceName) { Stream resourceStream = Assembly .GetAssembly( typeof ( Tools )).GetManifestResourceStream...
Filed under:
.net
,
c#
,
code
How To: Dynamically Load A Page For Processing
by
Palermo4
I have often desired the ability to dynamically load a page for processing, much like we do for .asxc controls with LoadControl(pathToASCX). For example, I may want to create a custom HTTP handler or module to dynamically load a page - while allowing...
Filed under:
.net
,
asp.net
,
c#
,
code
More Posts
Next page »