Friday, March 18, 2011

Add Google Analytics Tracking to iOS Apps

Hmmm... Look now someone is talking about iOS development. Well, I guess you have to go with the "Flow" of the software industry. Right?

So now on, I will be posting on iOS development that I find interesting/important and hopefully we can benefit from it.

I have always loved the way Google Analytics displays the powerful information about the content of your website. These guys have done a wonderful job. Now, they have GA for mobile Apps too. Cool!

I recently integrated GA into one of my Apps and would like to forward a few links for bookmarking:

http://code.google.com/mobile/analytics/docs/iphone/#gettingStarted

This guy on the link below does a pretty decent job of explaining how it works:

http://www.icodeblog.com/2010/04/22/how-to-integrate-google-analytics-tracking-into-your-apps-in-7-minutes/

Have a great discovery of data for your Apps!

Thursday, March 17, 2011

Commenting a .net server control

Pretty much basic stuff, but you really need it. The title of this post is self explanatory. Here's how you do it!


<%--

--%>


And There you are. Your old code safe and sound!

Monday, March 7, 2011

Fetching mutilple columns from Different tables using LinqDataSource and GridView

So after writing about Binding 2 columns of a Table to the DataTextField of Dropdown, I wanted to achieve even further with fetching column values from different tables

So I have a gridview showing Lectures information, which binds the "Title" of the Lecture and "show_id" (foreign key to "shows" table) . What I want to display is the Title of the show rather than just displaying the "show_id".

Lectures
Nameshows
SharePoint 1015
XCode 1012


to

Nameshows
SharePoint 101SPTechCon
XCode 101iPhonedevCon


On thing to be kept in mind for this is that you should have a property called "shows" to be able to reference to a foreign table. In short, your DataContext class should have inherited the foreign key reference applied between the shows and the lectures, with shows being the primary table and lectures containing the foreign key.







<%# Eval("Show.show_title") %>



OrderBy="name" TableName="showclasses">




Now when you run the code and there you are. It automatically kind of figures it the mapping between the tables with the "Show.show_title"

Wednesday, March 2, 2011

LinqDataSource with mutlple columns of a Table assigned to DataTextField

I have been working on LinqDataSource lateley. To me, it seem to save me some time and avoids code clutter in code behind. It can take care of all those basic master tables that you would want to populate to a dropdown list, gridview or listview.

One thing that I was looking into today was to bind multiple columns to the DataTextField of DropDownList. Here's how I got it:






Pretty much like writing query in code behind! I like it!