Dan Wahlin's WebLog

ASP.NET, XML, and Web Services Exploration
Playing Around with Song Writing and Recording Again

Reality (mp3) 

Written and Performed By:             Dan Wahlin
Lyrics:                                              Heedy Wahlin (with a little input from me).  She also gave tons of great input on a lot of different things from sounds, to melody, to rhythms. The lyrics for the song are shown below.
Production Advice:                          My good buddy Spike Xavier (I'll probably ruin his reputation by associating him at all with this song.  But, he had several great suggestions!).

UPDATE:  New mix released on August 27th.

Like a lot of developers, I've played around quite a bit with song writing/composition but realized early on that I needed to make a living somehow since the odds of making it in the music world never looked real good.  When I was 18 I was lucky enough to get a song played on the biggest pop stations in Phoenix, AZ at the time but nothing really came of that so I traded in playing on keyboards for typing on keyboards.  Due to the demands of work, school, family, golf (hah) and other things I haven't done much with song writing since then other than dinking around on my piano.  It's something I really enjoy and find relaxing....there's just not enough time in the day though.

About 1 1/2 years ago I bought the Roland Fantom-X8 keyboard/workstation (awesome product!) and have written several new songs in my spare time.  About 6 months ago I decided that writing songs for myself didn't accomplish a whole lot (my wife was on my case about that as well) so I started creating my home studio so I could record some stuff.  I'm now using Sonar Producer 5 as my recording software, the Fantom-X8 as my MIDI device and keyboard, Colossus and Kontakt for samples, the M-Audio 410 firewire device for connectivity to my laptop, a Jackson JS30 electric guitar, Marshall MXL and Sterling Audio ST55 mics, plus Ozone for mastering.

I just finished recording a new song called Reality (long story on the title and lyrics) and overall I'm happy with how it turned out.  It was fun recording music again and learning how to do everything digitally.  Feel free to download the song if you're interested.

 Lyrics:

Verse 1:
What's really underneath that charming smile
The coldness surfaces after awhile
And I've never known just who you are
You act like you're the world's big star

Verse 2:
You haven't found the nerve to face real life
You lie, you steal, you cheat, you cause such strife
And you can't recall just what you've done
But you always seem to have your fun

Chorus:
You live your life without a purpose and you fake reality
Life has so much meaning don't you blame society

Bridge:
Looking down on everyone
You fail to see the good they've done

The love they've shown through hellish years
Countless times you've played their fears 

I'd like to know when you will wipe their tears

© 2006 Dan Wahlin

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
Finding ASP.NET Child Controls....the Simple Way

My good buddy Spike Xavier and I were discussing how to find nested child controls today and we discovered a nice trick that can be used.  In the past, I've used parentControlID$childControlID syntax with the SqlDataSource and parameters to identify TextBox controls nested within a DetailsView control without resorting to C# or VB.NET code.  This type of syntax allows the page to query the parent control and then locate the target child control (the $ acts as the delimiter).  Spike needed to use the DefaultFocus attribute of the <form> element to set the focus to a TextBox nested within a FormView control.  We tried listing the TextBox ID directly in DefaultFocus and it didn't work (which was expected since it's a nested control).  We then used the syntax I had used previously with the SqlDataSource control in DefaultFocus and it worked....the TextBox received focus when the page loaded.

Here's a simple example that contains a FormView control named formVw with a TextBox inside of it named txtName:

<form id="form1" runat="server" DefaultFocus="formVw$txtName">
   
<div>
       
<asp:FormView ID="formVw" runat="server">
           
<ItemTemplate>
               
Name: 
                <asp:TextBox ID="txtName" runat="server"
                       
Text='<%# Eval("FirstName") + " " + Eval("LastName") %>' />
           
</ItemTemplate>
       
</asp:FormView>
   
</div>
</form>

Notice that the DefaultFocus attribute refers to the parent control first (the FormView) and then to the child control (the TextBox) using the formVw$txtName syntax.  There are several other ways to do this but none are as simple.  I experimented a little more and found out that this technique also works with FindControl().  The Page class's FindControl() method only searches for direct children.  It won't search grandchildren or lower descendents.  However, using the parentID$childID syntax FindControl() will walk the page's control hierarchy.  For example, to get to txtName (shown above) starting from the root of the page the following syntax can be used:

TextBox tb = this.FindControl("form1$formVw$txtName") as TextBox;
if (tb != null)
{
    //Access TextBox control
}

This is of course a loosely bound operation (quotes are being used so the compiler won't catch typos in the quotes) so I wouldn't recommend it if a strongly-bound technique is available for a given situation.  However, it's quite useful in some situations.  I haven't come across any issues with this technique (although I'm guessing there are some) but will post them if I come across any.  The simple ASP.NET Website I created to demonstrate these concepts can be downloaded from the following URL:

 http://www.xmlforasp.net/CodeBank/Download/Blog/FindingControls.zip

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
Master Pages Tips and Tricks

I'm giving a speech on Master Pages Tips and Tricks to the Capital Area .NET User Group in Virginia on behalf of INETA and Interface Technical Training.  Those interested in downloading the code samples and slides for the presentation can find them here:

 http://www.xmlforasp.net/CodeBank/Download/Blog/MasterPageTipsAndTricks.zip

 Topics covered include:

  • Handling paths in Master Pages  
  • Tips on handling nested Master Pages in design-view
  • Accessing controls within Master Pages from Content Pages using the MasterType directive
  • Providing consistency across multiple Master Pages using abstraction and inheritance
  • Dynamically assigning Master Pages at runtime
  • Assigning Master Pages dynamically to all pages in a Website using an HttpModule
  • Sharing Master Pages across IIS applications

If you're interested in reading more about Master Pages tips and tricks check out the following blog posts written by Scott Guthrie and K. Scott Allen.  I'll be discussing several of the tips these two have written about at the meeting.

http://weblogs.asp.net/scottgu/archive/2005/11/11/430382.aspx
http://www.odetocode.com/Articles/450.aspx

 

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
What will Atlas be named when it's released?

A lot of people have been wondering what the "official" name will be for Microsoft's Atlas framework.  Steve Smith blogged about it to see what ideas the overall community had at the following URL:

http://aspadvice.com/blogs/ssmith/archive/2006/08/16/Atlas_Naming_Game.aspx

There are a lot of new acronyms there in case you're bored with all of the existing ones. :-)

Share this post: Email it! | bookmark it! | digg it! | reddit!
Atlas Control Toolkit - A Few Demos

I'm finishing up a new article for asp.netPRO Magazine about some of the controls in the Atlas Control Toolkit and wanted to get the sample code posted so people could see a few of the workarounds I ended up doing.  Overall I really like the toolkit controls.  There are definitely some issues that I encountered that made some things I thought would be simple actually a bit tricky.  It's early though....and I know several of the issues I ran into are already known and being worked on. The sample code demonstrates using the following controls:

  • HoverMenu -  Demo is similar to the one in the toolkit demos.  It shows Edit and Delete LinkButtons as users mouse over a GridView row.
  • ModelPopup - Shows how to use the control with a GridView to handle deletes.  I had to implement a workaround since I couldn't successfully embed a data binding expression in the OnOKScript property value to track the index of the item being deleted.  It would just output the expression in the rendered HTML instead of dynamically evaluating it.  I'm looking to see if there's something else I should be doing to get that going so I can avoid my hidden field workaround.
  • PopupControl - Shows how to dynamically display a GridView control to select a customer ID in a textbox, use the UpdatePanel to handle paging and sorting without postbacks, etc.
  • ReorderList - Shows how to reorder a list of links.  I didn't realize it would auto-update the database at first (duh...thanks to Simon Allardice for pointing that out) so I wrote all of the code to handle doing the update and left it in just for demo purposes.  The control makes it really easy to do "drag and drop" reordering of items though.

Download the sample code here.

Share this post: Email it! | bookmark it! | digg it! | reddit!
ASP.NET 2.0 Programming Course at Interface Technical Training

I taught an ASP.NET 2.0 programming course this week at Interface Technical Training that went really well....I had a lot of fun. :-) I always enjoy interacting with the people in class and hearing about the different projects they're working on.  I like to do a lot of live "on-the-fly" demos so I promised that I'd get the demos posted.  They can be downloaded here.

I used custom courseware that I developed for the course.  Any companies interested in licensing the courseware (it's 5-day course that has the slides, course manual and lab manual) can contact me through the XML for ASP.NET Developers Website (http://www.xmlforasp.net).  Just click the "Contact Us" link.

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
ASP.NET 2.0 Presentation at Microsoft's Phoenix Location

On June 15th and 16th I had the opportunity to train 50+ people at Microsoft's Phoenix location on ASP.NET 2.0.  I met some great people and had a lot of fun showing many of the new features in V2.  The live samples I created during the presentation can be downloaded here. If you're going to run the samples make sure you update the connection strings located in the different web.config files (nearly all of the samples point to the standard Northwind sample database).

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
SQL Programming Intellisense with RedGate's SQL Prompt

RedGate (a company with some awesome SQL Server products) is releasing a tool called SQL Prompt that looks phenomenal from what I've seen to this point.  It allows developers to get intellisense as they develop SQL queries within Query Analyzer, SQL Server 2005 Management Studio, Visual Studio 2005, Visual Studio .NET 2003, SQL Server 2000 Enterprise Manager and UltraEdit32.  I haven't had a chance to try the beta out a whole lot yet but it looks like the final release will be May 22nd and I'm pretty excited about it since I've always wanted intellisense in these tools as I create different types of queries.  Did I mention that they're releasing it for free? :-)

More info can be found here:  http://www.red-gate.com/products/sql_prompt/index.htm

Share this post: Email it! | bookmark it! | digg it! | reddit!
ASP.NET 2.0 Talk at Los Alamos
I'm giving a conference talk on May 18th at Los Alamos, NM about new features in ASP.NET 2.0.  I've never been there (or to Santa Fe) so it should be fun to see that part of state.  The code for the talk demonstrates using Server controls, Validation controls, TableAdapters, data binding with the ObjectDataSource, Master Pages, Themes and more and can be downloaded here.
Share this post: Email it! | bookmark it! | digg it! | reddit!
.NET Distributed Application Development Class

I taught Microsoft's new .NET Distributed Application Development (intro and advanced) courses this week at Interface Technical Training.  I had a lot of fun and met some great people doing various distributed development projects.  I promised them I'd get the code samples I put together in class on my blog so here they are.  For those that attended....thanks!  I really enjoyed meeting you!

Distributed Application Development Code Samples

Share this post: Email it! | bookmark it! | digg it! | reddit!
More Posts Next page »