Unable to Get Value of the Property nodeType While Using Knockout
Last Updated on Wednesday, 13 March 2013 07:10 Written by David Bauernschmidt Wednesday, 13 March 2013 12:00
When I started using knockout.js in my applications I became excited to see the many uses of this library. It took me a little bit of time to realize how to implement it. One reason it took me a while was when I came across this error.
Learn MoreUnable to get value of the property nodeType
How to Send Emails Using a Template in ASP.net
Last Updated on Saturday, 23 February 2013 02:41 Written by David Bauernschmidt Tuesday, 5 March 2013 12:00
Over the years sending email in asp.net has gotten easier and easier but the requirements have gotten more complex. I want to show you how to using the system.net.mail reference to send emails using templates. I have a client that wants someone to fill out their information and have all that data placed into an email and sent to them. By taking advantage of email templates inside of asp.net this becomes a lot easier to manage. I could just create an html page and highlight everything between the body tags and use that to build a very large string and use that to replace text and to send it. There are a couple of problems with this choice.
Learn MoreHow to Create or Modify PDF Form in ASP.net
Last Updated on Saturday, 23 February 2013 02:41 Written by David Bauernschmidt Monday, 4 March 2013 12:00
It seems like regularly something comes up in the programming world that is requested by a client that should be easy, ends up proving to take more time, more money or both. So it is nice to find a solution to a problem that IS easy. This article is to show you how easy it is to use ASP.net web form to open up a PDF, set a value on a form and then send it back to the user’s browser. I have attached the project below if you want to download it. The first thing you need to do is go download iTextSharp.dll. I will be using visual basic (vb) for this project.
Learn MoreHow to Conditionally Load Google Analytics in a Web Application
Last Updated on Wednesday, 27 February 2013 08:44 Written by David Bauernschmidt Saturday, 2 March 2013 12:00
If you are a developer that uses Google Analytics in your ASP.net web applications then you know that loading up the Google Analytics in your web page should not happen when you are building the application. In the past I have always just commented out the section for Google Analytics until publishing the site. Then I would go in and uncomment the lines. This works if you do not forget to uncomment the lines in production. (This happened to me).
I decided that there had to be a better way to automatically do this. After searching the internet and pulling together prior knowledge of how an asp.net web site works I decided to use the web.config to help me. First add the following lines to your web.config production transformation file. (See here if you do not understand the transformation idea).
Learn MoreUsing Google Analytics to Track PDF Views
Last Updated on Saturday, 23 February 2013 01:37 Written by David Bauernschmidt Wednesday, 27 February 2013 12:00
I currently build and manage a pro-bono site for Greenwood Christian Academy where they have a lot of PDF documents. The users click on documents for enrollment, calendars, educational forms, health documents, etc. Just recently they also announced an event that offers sponsorships. The question that has come up lately is how to use Google Analytics to track how many people view the pdf documents and how many people click on the sponsor links. This may sound simple but then I realized that Google does not track counts for links that go away from the site or to pdf views. Not accepting this as failure, I started looking around and came across a “cool” feature that Google offers called ‘_trackEvent’. You can use this for a multitude of things but I believe this is what I need. The key is to realize that you need to attach something to the <a href> before the actual redirect. Since I always use the pdf and external links with a target=’_blank’ I decided to attach an event handler to the <a href>. The problem is this could take a while, especially if you have a lot of links and pdf. Thank goodness for jquery. I attached the code below as close to the end of the page as possible (preferably right before the </body>). This script attaches a click event to every <a href> if there is a target=’_blank’. I then determine if it is a pdf or just a “plain” link.
Learn More
Recent Comments