Contents tagged with c#
-
C# Training using 4994 Microsoft Courseware
This was my first time teaching the 4994 Microsoft courseware at [itt]. The course is an introduction to programming using either C# or VB. At Interface, we teach it exclusive to the language. This week I had a full house of developers, and we tackled the C# language together. Of course, I deviated from the outline and introduced the class more like "Introduction to C# using ASP.NET". Even though the courseware favored Windows development, it has been my experience that most developers coming in for .NET training actually move into ASP.NET programming. At the end of the week, my group was able to write C# code, create web sites & pages, talk to SQL Server, and know use Visual Studio effectively.
-
Video: Two New Methods in System.GC
In my latest video, I demonstrate how to use two new methods of the System.GC class in the .NET Framework v3.5: AddMemoryPressure and RemoveMemoryPressure. You will see the impact of using these methods correctly when allocating unmanaged memory resources in your .NET applications.
-
Video: Interactive Silverlight Using Ajax
Need dynamic data in your Silverlight application? Want to create a nice interactive experience for users of your site? In my latest video, I demonstrate how to generate XAML dynamically on the server based on user input - and serving that content through AJAX via Page Methods.
-
HttpRequest Using IsAjax & IsJson Extension Methods
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 request is AJAX or JSON?
-
How To: Access Underlying Data of the ObjectDataSource
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:
-
Revision: Get the Value of a Control Without an Instance of the Control
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:
-
Revision: Case-Insensitive String Equality
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:
-
How To: Create a Strongly-Typed Property For HttpContext.Items
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, the key/value pair is not strongly-typed. If I am going to access a value often, I would like to make the call as simple as possible. Here is an example of a property I created that "wraps" HttpContext.Items around a key value, yet exposing the value as a string, not object:
-
How To: "Upsert" Into AppSettings
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 file directly.
-
AJAX Without ASP.NET AJAX
On day nine of my "post a blog every day in July" mission, I want to share how to get AJAX behavior in ASP.NET without using AJAX Extensions 1.0. Keep in mind, I prefer to use AJAX Extensions! This blog is for those out there that need a sprinkle of AJAX on their site, but are not allowed (for whatever reason) to install AJAX Extensions.