asp:ListView Insert and Update not working

I have been working on a solution that used the asp:ListView to manipulate data from an access database.

After defining the Layout, Item, EditItem, and Update Templates I was impressed with how much control I had over the display formats and CSS integration that this control allows.  The template I was using is a standard html table.  The display of the data worked perfectly, but when I attempted to edit a record it replaced everything with blank values.  Inserting a new record either gave me an error or inserted a new record with all the fields blank.

I started to troubleshoot by looking at various examples and tutorials on MSDN and the Internet.  I could see no difference between what I had coded and the examples.  I was using an AccessDataSource and all of the examples were using SqlDataSource, so I redefined the data source to be Sql and still the same behavior, display worked fine but editing did not work. 

I am one of those people who prefers to hand code as much as possible to make sure that I am understanding what is happening and how the controls work.  But, I had reached my limits, I just could not figure out what I was doing wrong.  I broke down and used the wizard for the ListView and let it create the templates and data source.  This worked. 

So after looking at the templates I discovered one little difference.  In my Item templates I had defined the <tr> tags to include the runat=”server” directive.  I removed this directive and everything started working like it is supposed to.

Why did this fix it?  Well, as near as I can figure when the items are inserted into the template replacing the itemPlaceholder the runat=”server” directive in the item templates overrode / hid / replaced the methods from the itemPlaceholder.

30. January 2009 09:30 by Duane | Comments (1) | Permalink

Business Leaders Listen Up! Inter, Intra, and Extra nets are not the same!

Contrary to what Content Management System (CMS) sales and marketing forces around the world want you to believe, Internet, Intranet, and Extranet are not the same thing.  Pay attention I am only going to explain this once…  These business tools are not used or delivered in the same way, have different goals, and have different technological requirements.

You still need more of an explanation…  Lets start with some vocabulary.

Internet
The Internet is a global system of interconnected computer networks that interchange data by packet switching using the standardized Internet Protocol Suite (TCP/IP). The Internet carries various information resources and services, such as electronic mail, online chat, file transfer and file sharing, online gaming, and inter-linked hypertext documents.  The Internet is open to the general public. Wikipedia
Intranet
An intranet is a private computer network that uses Internet technologies to securely share any part of an organization's information or operational systems with its employees. Sometimes the term refers only to the organization's internal website, but often it is a more extensive part of the organization's computer infrastructure and private websites are an important component and focal point of internal communication and collaboration. An intranet is not open to the general public.  Wikipedia
Extranet
An extranet is a private network that uses Internet protocols, network connectivity, and possibly the public telecommunication system to securely share part of an organization's information or operations with suppliers, vendors, partners, customers or other businesses. An extranet can be viewed as part of a company's intranet that is extended to users outside the company.  An extranet is not open to the general public. Wikipedia

Let me see if I can further clarify…

There is only one Internet (notice the uppercase “I”. Some people will argue, correctly, that an intranet is just interconnected computers and these internets are not public domain nor are they necessarily connected to each other.  I am not talking about that internet (lowercase “i”))  Anyway, I digress… there is only one Internet.  This is the public computer based advertising and selling arm of your company.  This is where you interact with “John Q. Public”.

Your companies intranet is where you post all the juicy little bits of information you don’t want other companies and “John Q. Public” to know about.  HR policies, internal procedures, inventory controls, cost structures, financial data, and the company newsletter all are perfect candidates for your intranet.

Your companies extranet is where you allow someone from a trusted external company to authenticate themselves and then gain access to selected information about your company.  WalMart is using an extranet to allow suppliers to check the inventory levels for the external companies products at each of its stores.  This is not open to the public.  You have to provide secure methods of connecting and authenticating.  Can you imagine what would happen if Huffy found out Schwinn bicycles login?  Or if one supplier found out the cost of another competing suppliers product? 

So, when that sales person tries to sell you on the fact that their CMS is capable of handling your Internet, Intranet, and Extranet content take a moment and think about that claim.  Can they really control access to your most private business secrets on the same system that holds your publicly accessible Internet content?  What would happen to your company if your competitor or even a supplier got into the wrong area?  Invite your IT staff to the meeting and let them ask the technically specific questions about how the CMS system will work.  Then listen to your IT staff about their concerns before deciding on a CMS provider.

16. January 2009 13:59 by Duane | Comments (0) | Permalink

Xiamen was not bad

I had as much fun as I could in Xiamen.  I was actually there on two different trips during the summer of 2008.  Yes I know this update is a little late.  I saw some interesting things and some beautiful scenery on my days off.  If you visit Xiamen you must go to Gulangyu Island and climb to Sunlight Rock.  I caught up with my old friends and made some new ones.  As someone who emailed me pointed out it is against the law to honk on Xiamen Island, so the honking was kept to a minimum.  When I came home from the later trip (October 11) it was snowing in Utah.  That was a shock after being in the warmth of Xiamen.  Any way I am home now and will not be going back to Xiamen unless it is on a vacation.  Something that might happen when my son is old enough to make the 14 hour flight and remember the people and experiences.
15. January 2009 15:07 by Duane | Comments (0) | Permalink

Xiamen China

I am getting ready to travel to China for the third time.  The first was in March 2004, the second was March 2008 each of those trips was for 1 week and 2 weeks respectively.  This trip is for a month.  The city I will be living in is Xiamen, Fujian, China.  Xiamen on Google Maps   Xiamen is a small city by China standards only 2 million people.  To give you an idea that is the entire population of Utah crammed on an island with a 4 mile radius.

I will be living in a one bed room apartment on the 26th floor on a major street.  Cars honking all night long.  There is a clothes washer but no dryer.  The fridge is a mini-fridge, you know the kind that are only good for a couple six-packs.

Keep an eye on this blog I will be posting to it as much as possible during my trip.

15. July 2008 13:19 by Duane | Comments (0) | Permalink

I graduated - Now what?

I finally did it.  18 years after graduating from High School I finally finished my bachelors degree.  The last year has been the toughest of all.  My son was born, I went to China for 2 weeks, I worked full time, and took a full load 12+ credit hours.  This resulted in 4 hours of sleep a night, no TV, no Guitar Hero (and 3 came out :( ), no weekends, basically no FUN.

So, I need your help. 

What in the world do you do for FUN?  Keep it PG rated otherwise you'll never see it!

8. May 2008 15:47 by duane | Comments (0) | Permalink