March 2006 Entries

Calling Multiple Web Services Asynchronously

There are two ways to call web services:  synchronously and asynchronously.  Below is an example of a syncronous web call.  The HelloWorld() call will not get executed until the ReturnLastCustomer() is completed.  In some cases this is fine.  For example if you need the information from ReturnLastCustomer() to then call the HelloWorld() example. Syncronous Web Service Call             localhost.Service proxy = new WindowsApplication3.localhost.Service();             localhost.MyCustomObject myObject = proxy.ReturnCustomObject();               // Make another call to web service             string hello =  proxy.HelloWorld(); In the example above we wouldn't really care if one method completed before another.  There may be code...

Channel 10 launched

Channel 9 has been around awhile and is one of the things I spend time in the evening watching if there are new videos.  There's always good content on channel 9 and its great to hear the people that built a lot of the technology we use talk about it.  Channel 9 is where they interview developers at Microsoft on how things were written or work.  Channel 10 is a new site built upon Asp.Net 2.0, SQL Server 2005 and Ajax.  The site's mission is to provide content for the other side, the people that are using the technology.  There are lots...

Sharing Data with Multiple Windows Forms

I see this question a lot on forums, discussion boards and mailing lists.  This question is typically asked in various ways.  Here are a few examples: How do I access a varible in form2 from form1? How do I update a textbox field when a user clicks on a button in form1 to form2? How can form1 be updated with data from form2? How can I share data between two different windows forms? Whatever the question is the underlying problem is still the same, getting something...

Tonight is game night

A few weeks ago Ellen and I had to go to Jackson for the weekend to a piano contest she was judging. Since we had to leave for two nights we needed someone to watch our dogs while we were away. Two of Ellen's students, Carlena and Shea, agreed to watch the dogs for us but we had to have game night at our house to reward their services. Tonight was game night. Everyone gets together and we have a meal then we break out all of the board games. We started by cooking some burgers and hot dogs on...

Page Methods and URL rewriting

Although I haven't used this particular project, I ran across something today that I thought was an interesting project.  The project allows you to handle page methods and rewrite URLs.  For example if you have a URL like keithelder.net/blog/article.aspx?id=12 and you want it to be keithelder.net/my-title.aspx instead.  Virtual URLs are very handy.  Even on blogs like this for example where you link to a post of a item, you aren't really hitting a static page.  It is all virtual.  The project just released an update for VS2005. You can check it out on the offical PageMethods web site.

How an open source developer transitioned to .Net

For a long time I've been wanting to put this together.  A lot of my friends who were open source advocates like myself are perplexed with my transition to what they call the "Dark Side" of development.  Referring of course to Microsoft as the evil empire.  I took some time this morning to finish how and why I migrated from programming mainly in PHP to .Net.  I didn't want to put this information into a blog post because as I was writing it, it just didn't feel right so I created an article out of it.  In order to give you the...

Converting Generic Lists or Collections to a DataSet

Today I had a situation where I was calling a web service that returned an array of items.  Here is a sample of the XML the web service was returning.  <?xml version="1.0" encoding="utf-8"?><ItemCollection>   <item>      <FirstName>Keith</FirstName>      <LastName>Elder</LastName>      <FavoriteColor>Blue</FavoriteColor>   </item>   <item>      <FirstName>Chris</FirstName>      <LastName>Risner</LastName>      <FavoriteColor>Pink</FavoriteColor>   </item>   <item>      <FirstName>David</FirstName>      <LastName>Little</LastName>      <FavoriteColor>Carnation Pink</FavoriteColor>   </item></ItemCollection> The web service returned the data as expected but I needed to bind this to a DataGridView in the user interface.  For anyone that has used VS2005 you know this is pretty simple.  I added a new data source of type "Object" and selected my ItemCollection object that was generated from the WSDL of the web service.   I dropped the ItemCollection onto the designer and I had a DataGridView...

Glad I dropped Tivo for Media Center

It was December 2001 when my wife bought me a Tivo for Christmas (see tivo review). At the time I loved it. It was the best thing since electricity. I decided to not purchase the lifeline subscription because I knew something better was going to come out with more hard drive space, ethernet etc. As it turns out I was right. Back then I think it was soemthing like $9.95 per month. Not too bad really. I remember walking around the office after returning from Christmas break selling Tivo to everyone. One of my co-workers at the time, Mike Kimsal...

Single quotes in DataView.RowFilter and DataSet Selects

I've been working on a new feature for a Smart Client at work and it was time to push it to beta and have QA go over it.  I was speaking to the QA team member and they were certain they could break the new feature with just a single quote.  The reason this QA team member said this is they test a lot of PHP web apps which are notoriuos for this type of mistake because of magic quotes turned on or off or whatever.  As I explained to them, the Smart Client shouldn't encounter this when saving or...

«March»
SunMonTueWedThuFriSat
2627281234
567891011
12131415161718
19202122232425
2627282930311
2345678