ASP.NET

South Florida Code Camp 2010

This year was another great year for the South Florida Code Camp. Lots of people, sessions, speakers, books, software, food, water, sodas, and a great atmosphere. Both of my Programming Web 101 and 201 sessions went great. I had a small problem with time for my 201 session as I was told by a person I had to end by 10:50, when in reality I had until 11. I apologize to everyone who was at my 201 session for not being able to cover the entire presentation. You can download both the presentation and the project files from the following links: Programming...

posted @ Monday, March 01, 2010 11:33 AM | Feedback (2)

Problem Creating a Localized, Embedded Script

I was following this tutorial and was getting the error: Assembly 'AssemblyName' contains a Web resource with name 'ResourceName', but does not contain an embedded resource with name 'ResourceName'. Everything seemed to be perfect except that I forgot to set the JS file to build as an Embedded Resource: Happy Programming!

posted @ Saturday, January 16, 2010 3:42 PM | Feedback (1)

Out of Process Session State and LINQ To SQL Entities

When using ASP.NET you can choose 4 different ways of storing session: In Process, State Server, SQL Server, or Custom. When using In Process the session is stored on the ASP.NET thread of the web server, but when using the State Server or SQL Server the sessions are stored outside the ASP.NET thread. When would you use Out of Process session state? Mostly when you have a web farm and you need to share the same session across all web servers. You might choose to use it even if you have one web server for the simple reason of saving...

posted @ Friday, November 13, 2009 11:56 AM | Feedback (1)

JavaScript not working within UpdatePanel

The other day I was having a problem with JavaScript functions not being found. The simplified setup was similar to this: - UpdatePanel    - UserControl (Visible = true)    - UserControl (Visible = false)       - Embedded JavaScript and Controls There was some controls on the page that triggered an asynchronous postback which changed the visibility of the UserControls and when the Embedded JavaScript was called I was getting JS errors. Here’s the question I asked on the forums: http://forums.asp.net/t/1484503.aspx. According to InfinitiesLoop: The...

posted @ Monday, November 02, 2009 9:03 AM | Feedback (0)

Sample Code for Getting the User Location based on the IP Address

Yesterday I introduced a free service to get the location of the IP Address. If you haven’t read it, go on read that first (it’s very short, I promise). So here I am today, showing you my small .NET API to abstract the XML returned by the service. First we need an object to hold the data. I called it UserLocation. 1: public class UserLocation 2: { 3: public string City...

posted @ Thursday, September 03, 2009 2:01 PM | Feedback (2)

Get Location of the IP Address

I wanted to share with all of you a free service that provides you an approximation of your user’s IP Address. You can read about it here: http://www.hostip.info/use.html. If you are looking for a more sophisticated solution that is maintained more often than the free solution you can also use this service: http://www.maxmind.com As of this writing you can get the response in 2 different forms: XML or plain text. I like the more structure formats so I will be using the XML option. Stay tune… I will post a C# API for retrieving the information. UPDATE:...

posted @ Wednesday, September 02, 2009 3:00 PM | Feedback (3)

Routing in ASP.NET 3.5 and 4.0

Routing was born with the creation of the asp.net MVC Framework. During the beta testing of the MVC framework people started asking for this feature to be included in asp.net so it could be used with web forms as well. The asp.net team listened and included Routing with the release of .net 3.5 SP1. Thanks for the history, but what exactly is routing? Routing enables you to use URLs that do not map to a physical location on the server. For example in a normal page request for the default.aspx resource there has to be a physical file default.aspx...

posted @ Friday, July 17, 2009 7:52 PM | Feedback (0)

SQL Server 2008 Spatial Data and Virtual Earth at Devry

Tomorrow I will be speaking about the SQL Server 2008 Spatial Data and Virtual Earth at Devry for the Miramar.NET user group. It will be a very informal meeting where we will discuss about the new Spatial Data Types in SQL Server 2008, Virtual Earth, and some sample codes and ideas on how to integrate both. The meeting will be held at Devry University Miramar Campus tomorrow (5/12/2009) at 6:30 PM on Room 254. If you are also a student of Devry I recommend you go to room 132 at around 6 PM where I will be speaking to...

posted @ Monday, May 11, 2009 8:29 AM | Feedback (1)

Strong Typing a User Control with LoadControl()

We use the Page.LoadControl() method when we have the need to dynamically load User Controls into a page. If you look at the signature of the method the return type is of type System.Web.UI.Control, which is one of the base classes for all controls (directly or indirectly). This is fine when all we want to do is load the User Control, but sometimes we need to reference some properties, methods, events, etc of that control and to do so we have cast the instance of the control to the correct type. The first thing one tries is: ...

posted @ Thursday, April 16, 2009 2:09 PM | Feedback (1)

Unable to load DLL ‘Microsoft.VisualStudio.QualityTools.RecorderBarBHO90.dll’

I was trying to record a Web Test using Visual Studio Team System 2008 with Internet Explorer 8 on a Windows Vista 64 bit machine. After creating the Web Test IE was launching without the Web Test Recorder Explorer Bar. Going to View – Explorer Bars – Web Test Recorder 9.0 would show up, but after clicking Stop I would get the following exception: “Unable to load DLL ‘Microsoft.VisualStudio.QualityTools.RecorderBarBHO90.dll.’ The specified module could not be found. (Exception from HRESULT: 0x8007007E).” After a few recommendations on the web the problem was solved by moving the dll found...

posted @ Tuesday, April 07, 2009 7:51 PM | Feedback (1)

Full ASP.NET Archive