Geeks With Blogs
Zackary Geers blog
04
Mar 10

This works slightly better then my previous version, it figures out the framework directory on the fly.

for /D %%d in (%systemroot%\Microsoft.NET\Framework\v4.0.*) do %%d\aspnet_compiler -v / -p "$(ProjectDir)\"



I found a simple post-build event I use to ensure the.aspx/.ascx'es are valid and won't throw compile errors at runtime. (For VS 2010... If you're reading this after VS2010 went RTM, the version number is probably different then this one) Open your project settings, go to the Build Events tab, and enter this in the Post-build event command line: section. ......

This is just an extension of my earlier post. You can easily render an Action on a standard ASP.Net page with the following code. The SimpleViewDataContainer is the same one from my previous post. HtmlHelper helper = new HtmlHelper(new ViewContext(), new SimpleViewDataContainer()); helper.ViewContext.HttpContext =new HttpContextWrapper(HttpCont... ......

I'm working on a existing project, where we've recently added in MVC, but there's a lot of existing Asp.Net code. I wanted MVC to generate the link for me instead of hard coding it. Here's how I did it. I started by creating a class that implments IViewDataController, so I can construct the helper I need. Then I can new up the HtmlHelper, set it's Context, ......

I've heard a lot of people complain about IE and jQuery, and I found out something that supprised me. IE doesn't support the jQuery class selector well, so it's best practice to avoid it. I've mentioned it to a few other people, and they were shocked to hear about how badly it performs. Take a peek at this article, and it describes it in detail. http://www.artzstudio.com/2... ......

I ran across a situation at work where we have some .aspx's that failed to compile, and we didn't have any kind of warning for it in Cruise Control. I found a great fix for the problem in one of JP's blogs. http://blog.jpboodhoo.com/A... That will warn you about errors compiling the aspx file, so you don't have to wait ......

I'm used to working with StructureMap, and so I do part of my testing by passing in a stub to override the configured behavior by using StructureMap.ObjectFactory.... >(myMockedObject); I looked hard to find a simular behavior for Windsor, and I finally found it. I tried to do: IWindsorContainer container = new WindsorContainer(); ......

08
Jul 08
Something I've found is bugs in my ASPX files that refering to things that don't exist in the codebehind, and I finally learned how to make my build include compiling the file. As I understand this will do the same build process that the runtime does when viewing each page. This nant script expects the website directory to contain the fully ready website, ......

I'm in JP Boodhoo Nothin' But .Net class, and I when I was told it was a very intense course, they weren't lieing, but I've learned a whole pile of things, I'll try to actually blog on them. So far my favorite has been the Specification pattern. With the number of cases we've had at work of "When a new order is created with these items, but not this, ......

There is a great video at http://www.scivee.tv/node/2903 , which gives Ten Simple Rules for Making Good Oral Presentations. Many of the best speakers I've seen seemed to follow these suggestions. I think it is a great watch for anyone because a lot of the advice can be used for smaller situations at work too ......

I spent the past few hours hunting down a hidden bug in our code. ASCIIEncoding isn't what you think it is offhand, it only deals with the lower 7 bits. System.Text.Encoding.AsciiE... doesn't support characters with accents. I'm switching from using AsciiEncoding to using Encoding.GetEncoding(1252). Codepage-1252 is what I always think of when I ......

BLAH! I've found out there's an issue with HttpWebRequest in 1.1 where it will mysteriously stop downloading files (may be related to https), yet when I switch to 2.0, my code works perfectly. While I'm glad I've found a way to get it working, it drive me nuts! Also I hear rumors that there may be a bug with HttpWebRequest not properly flushing when ......

I was stumbling around the web, and decided to stop by Coding4Fun, which has been improved since I last saw it. If you haven't looked around that site, it's an interesting site from MS that shows a lot of fun little applets that are also tutorials. And today on the top of the list when I looked at it is this article mentioning that mono now supports ......

23
Feb 07
I've asked myself... What do I know that's worthy of talking about, then I realized, it's what I don't know that actually seems worthy of being discussed. How can we help out others that want to learn to be better developers? I've started to sit and wonder, what does it take to catch up to modern software development practices. I graduated from my local ......

16
Feb 07
I've been sitting here with this blog, wondering what my first post should really be, and when I was at the Austin .Net Users group meeting, I finally came up with my first decent idea. I've seen all sorts of fragments of code around showing how to do this and that, but I really haven't seen anything like that for design. Even for something as trivial ......

Copyright © Zackary Geers | Powered by: GeeksWithBlogs.net