MSDN

ASP.NET AJAX is out of beta!

As ScottGu announced, ASP.NET AJAX (formerly ATLAS) is finally out of beta and can actually be considered for my next project! Like I didn’t have enough to do…

Technorati Tags: ,

MSDN

Comments (0)

Permalink

MSDN: Esposito on enums

Dino Esposito did a writeup over at MSDN on enumeration types. I was about to dismiss it, but then I realized that I don’t really use them in my code, so I should probably review them. Sure enough, I leaned a few things, particularly around using them as bitfields via the Flags attribute:

1 [Flags]

2 enum Foods : int

3 {

4 apples = 1,

5 pears = 2,

6 oranges = 4,

7 bananas = 8,

8 beans = 16

9 }

10

11 static void Main(string[] args)

12 {

13 Foods foods = Foods.apples | Foods.bananas;

14 Console.WriteLine(Enum.Format(typeof(Foods), foods, “g”));

15 Console.ReadLine();

16 }

That outputs “apples, bananas” which is a handy way out of writing an output loop with comma separators, but is kind of useless. Where it gets handy is the Parse operator, which can take “apples, bananas” from a string, say, for instance, a config string, and make it into a variable. Nice.

1 static void Main(string[] args)

2 {

3 Foods myFoods = (Foods)Enum.Parse(typeof(Foods), “pears, beans, oranges”);

4 Console.WriteLine(Enum.Format(typeof(Foods), myFoods, “g”));

5 Console.ReadLine();

6 }

Technorati Tags: , ,

MSDN
Programming

Comments (0)

Permalink

MSDN Webcast report: ASP.NET Soup To Nuts - Tips and Tricks

I had a chance to check out the “Tips and Tricks” MSDN Webcast from the ASP.NET Soup to Nuts series - there’s so much stuff in 2.0 that I figured it was well worth my time to get a refresher/review, especially since, like most MSDN webcasts, it happened at noon. Again, like every other MSDN webcast, my lunch wasn’t ready when it started. Wireless laptops are handy. :)

Here are my notes. Has anyone else had any experiences with these features?

The webcast was basically a response to questions that the Bill had been asked over the course of the series so far, so there wasn’t much of a slide deck, just a series of demos covering various bits of .Net, including…

Wizard control

I’ve implemented a few wizard-type multi step processes for data entry in the past, and while it’s a lot easier to do it in ASP.NET than, say, PHP, it still hurts a ton. The new Wizard control appears to take care of a lot of the mess for you, and it’s definitely going to get a workout when I have to do the next one of these.

Multiview control

Simplifying the above, this appears to be a replacement for manually managing Asp:Panel controls and their visibilities depending on what’s going on - I know I do a ton of that already, so if there’s a nicer way to handle these cases, bring it on!

Validation controls

I was already well aware of these (they do save a lot of time), but it struck me as they went through the demo that I always invoke them from code view (ASP.NET code, not the C# code file). I spend most of my time in this view, probably because of too many burns in the 2003 days, but I really should give the graphical editor another try. “Act like it’s a demo” might be a neat mantra to improve my productivity. :)

Binding to XML

This is just another example of DataSource objects, in this case an XmlDataSource. Nothing new here for me, but I need every reminder to use the built in controls that I can get - I tend to do this crap with code still.

urlMappings section of system.web

Where did this come from? Anything that remotely approximates .htaccess/mod Rewrite in the Apache world needs to be sent to me via FedEx - it’s the weakest part of IIS, as far as I’m concerned.

FileUpload control

I ported some of our 1.1 code to this a while back. It’s still not clear to me if the 2.0 version has the same problems with big files (several clients uploading really big files at the same time can cripple a server). Anyone?

Setting focus to fields on startup

Not too exciting, just putting textBox.Focus() into the Load event for the page. I guess Focus is new in 2.0. When they started talking about default controls I thought they were going to talk about dealing with the enter key in forms.

MaintainScrollPositionOnPostback

This could be a handy page directive for big pages. I need to review the directives in 2.0…

New properties for the Label Control

Things like AccessKey, AssociatedControlID, etc really show how the Label control has gone from a “why bother” widget in 1.1 to something that makes accessibility easy. I really got tired of trying to do things the “right” way and the ASP.NET way in 1.1 - they were really at odds back then.

Technorati Tags: , ,

.Net
MSDN

Comments (0)

Permalink

LINQ’s great, can’t wait till I’m 40

For a collections junkie like myself, Microsoft’s LINQ technology looks pretty damned cool - it’s basically a way to get query languages integrated nicely with code. I’m not going to get too far into it, since I imagine it’ll all change before C# 3.0 gets out.

And that’s the point.

My former job was in a large, enterprise-sized company. When I left earlier this year, they still had Windows NT on a lot of the desktops. I would claw my eyes out every day reading about the cool features that would solve real problems, all available Right Now, but I knew that the company wouldn’t have the infrastructure rolled out for at least another year, and there was a good chance that IT would leave out some DLL that didn’t matter to anyone but me (yes, I could get it included, but it would take a fight and 6 months to deploy).

In the meantime, Microsoft would go and pitch the Next Big Thing, like they did this week with C# 3.0. If I’m not mistaken, version 2.0 isn’t even out in a non-beta, production-supported release yet.

Don’t get me wrong - I chose to subscribe to MSDN so I could get more access to these toys and better plan the technology roadmap for my new company’s products. I’m working on what I hope will be my last .Net 1.1 project right now, and I’m screaming at VS.Net 2003 every day for no better reason than the fact that I know 2005 will be so much better. It’s just too bad that 2005 is doomed from the start, because it doesn’t support version 3.0.

In the last job, open source stuff like Rails, etc. were incredibly exciting for me because they represented fewer roadblocks to getting things out the door. Now that the new company is firmly in the MS camp (although we do use MySQL), and it’s mostly my fault decision, I can see a bit clearer - the frameworks we create with whatever tools we use are the exciting part, and while MS’s 5 year (or whatever) vision may help us keep things exciting (or make some of our frameworks obsolete), at the end of the day, it’s the bandwidth from our brains to the code that has the power to depress or exhilarate us.

MSDN

Comments (0)

Permalink

Unexpected dividends

Virtual PC install on OS X

I don’t know why I didn’t realize this earlier, but my MSDN subscription includes not only Virtual PC for Windows, but the OS X version as well. Sweet!

I don’t expect I’ll be using it a lot, but if it does a better job than the OS X version of Remote Desktop Connection (only one connection at a time???), I’ll be happy.

The rest of the MSDN pack looks pretty cool, I just have to find enough disk space on my ThinkPad to be able to take advantage of it beyond the desperately needed copy of Visual Studio that I downloaded as soon as I got my welcome email. I’ve already bought two computers this year, and it’d be real swell if I could last until January before buying another (although I already have a spot picked out for it in the new office…)

Don’t get me wrong - I still love my Mac, but C# pays most of my bills. Uh, I guess that includes my MSDN subscription bill…

Update: Wow, that took a long time. Slooowwww…. Granted, I haven’t changed any of the settings, but I can’t imagine running anything on the “listed as supported” G3. On the other hand, since I only wanted this for the odd Remote Desktop Connection session, and in those cases the processing power is done elsewhere, it’s actually pretty comparable to the same work on the laptop - network lag is just enough to cover for the emulation layer.

MSDN

Comments (0)

Permalink