Tuesday, October 26, 2010

 

Error Creating Control

I recently came across this error in a web app I had taken over from a previous developer. The app compiled fine, and ran just fine too.

The pain is caused when you need to adjust properties via the smart tag of the control. The control is no longer visible, so the only way to make the adjustments is to hand code the markup code. That can be slow, and in my case, impossible as it was a control I was not familiar with.

After much Googling, and filtering out results that dealt with VS2003, 2005, 2008, I found a solution.
VS2010 is doing a lot of things in the background, like checking your web.config file and your session variables.

Now the link at the beginning of this post refers to the OnInit() method. If you don't use this method, you may need to check your Page_Init() method.

If you are coding in VB then place this snippet at the beginning of the Sub

If Not DesignMode Then
If Context IsNot Nothing AndAlso Context.Session IsNot Nothing Then

... your code goes in here...

End If
End If

If you code in C# then place this snippet at the beginning of your method

If (!this.DesignMode)
{
... your code goes in here...
}

Save and Close the page/s, Clean and Rebuild your project.
You should now be able to see your controls again :-)

Labels: ,


Monday, August 23, 2010

 

iPhone Vs Andriod

I have an iPhone. You probably do too.

It seems that Apple's attempt to win over business users from Blackberry, iPAQ, et al has been successful. And not without good reason either. Quality construction, user-friendly interface,lovely screen - the reasons are numerous.

My son was showing me his new Google Nexus Andriod-driven phone, and I was VERY impressed. Considerably faster than my iPhone, more apps pre-installed, and something that had not occurred to me before - a more commercial interface.

Why is this important?

Probably my one pet hate about my iPhone is the way it refuses to display my Outlook contact details in company name order. I can choose between Firstname then Lastname, or the other way around, but not by company. This is very confusing if I have multiple people with the same name working for different companies. For example, David appears 27 times in my contacts list! I have no idea which David belongs to the particular company contact I am needing to call unless I open up the record.

Time-consuming.

Inconvenient.

Painful.

Will my next phone be something other than an Apple product? Right now it's hard to tell. I LOVE the quality of the Apple build, but as my contacts list grows, the inconvenience is increasing. Apple have a well-earned reputation of thinking about how the consumer will use their products, so come on Steve, time to make business users happy.



Sunday, February 7, 2010

 

You CAN teach an old dog new tricks!

I'm a great believer in learning keeps you young. Stop learning and you may as well curl up your toes and call it quits.

The problem comes of course when an old brain has to learn new concepts. It may take much longer; it may take a LOT of repetition or attempts, but keep at it, and you can grasp a new skill or learn new information on a previously unstudied subject.

Some things, of course, are never meant to be. All things are possible, except skiing through a revolving door; and if you're over 70 years old, or are physically frail, then skate boarding is not for you. But apart from these obvious examples, I think many of us tend to limit ourselves more than we need to.

Why am I talking like this? Well, I saw this the other day (YouTube Video) and my initial reaction was one of concern. I realised that I had always thought there would never be a time when technology would get the better of me. Oh sure, installing new home entertainment equipment seemed to be a much longer process, but that was due to the increased complexity required to play my CDs.

Having spent some time thinking about this I realize that there is no need for fear. It might take me longer than the 16 year old down the road to connect up my new TV, but I'm going to enjoy the movie much more than he will. I'll get to see it a dozens times or more because I keep falling asleep in the boring bits.





Labels:


Tuesday, December 1, 2009

 

ORM or die!

I recently blogged about the DevExpress ORM tool - Express Persistent Objects (XPO). I have had (and continue to have) a great experience using this tool. Everytime I use it, I find something else that endears itself to me.

Having made the decision that all future projects would include a data access layer (DAL) based on XPO, I was nontheless surprised at how important some developers consider an ORM tool to be. So important in fact, that they are willing to advocate leaving an employer who does not allow the use of an ORM tool. (See link in heading for the full story).

My first reaction was, "This is a a bit extreme". After all, the GFC (Global Financial Crisis) is still affecting most of the world, and job security is not as good as it was a few years ago. Upon reflection, however, I am now inclined to agree with this sentiment, and I do so for two main reasons.

Firstly, professional development is difficult enough to stay current with, without being hampered by the lack of access to current tools. Every job, every project, every domain space provides an opportunity to increase knowledge and expertise. Being fettered with non-involvment with a specific tool or model or paradigm cannot be good for your CV, or even your sense of self-confidence.

Secondly, and maybe even more germane to a professional developer, is the responsibility to provide accurate, honest, and professional service to your employers - even if they don't understand or disagree with your advice. I don't know if there is a legal accountability to ensure your employer/client receives valid, up-to-date, best practices advice, but there is certainly a moral one.

Personally, I have few clients who are even remotely interested in the technologies I employ to provide the applications they need. They only care about the end result. But if they discovered that I ignored a major tool or model while developing their applicaton they would sack me; and they would be fully justified to do so.

Labels: , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]