C

Exploring c and insights from my journey

Windows Phone 7 Mango

C

Well, I got a Samsung Focus S to play around with this weekend and test the windows phone 7 OS out.  Overall, I liked it, but I can’t switch from iOS just yet. UI The “Metro” UI is actually quite nice, I found it easy to use and find everything.  My biggest gripe is lack […]

Read More

How to Show Your Meta Description and Keywords on an ASP Master Page

C

So today’s challenge was to display the Title, Meta description and meta tags on a site I am currently working on for troubleshooting and SEO reasons. The solution I came up with was to place the following code in the code behind of the masterpage. protected void Page_Load(object sender, EventArgs e) { HtmlHead headTag = […]

Read More

WPF Dynamically Added Controls and Getting Values

C

Today’s challenge was fun. I had added a bunch of textboxes and labels to a Grid with 2 StackPanel in my code behind. StackPanel sp1 = new StackPanel(); StackPanel sp2 = new StackPanel(); Grid g = new Grid(); ColumnDefinition colDef1 = new ColumnDefinition {Width = new GridLength(50)}; ColumnDefinition colDef2 = new ColumnDefinition(); g.ColumnDefinitions.Add(colDef1); g.ColumnDefinitions.Add(colDef2); gb.Content […]

Read More

Microsoft C#, LINQ, XML, WPF and the Lack of Good Examples

C

Ok, My rant for the day is about trying to use Microsoft C# and LINQ and XML and WPF. I spend more time trying to figure out simple stuff, because nothing exists as solid examples of how to do what I need to do.I spend so much of my time trying to find decent examples […]

Read More

Writing Out LINQ to XML Documents to CSV Text Files

C

This may sound stupid, but I wanted to store some text parsing I was doing for some VDP projects in LINQ to XML XDocuments. So, I created the following:XDocument recs = new XDocument();XElement records1 = new XElement(“Records”);XElement record1 = new XElement(“Record”);record1.Add(new XElement(“id”, “1”),new XElement(“Name”,”Test”),new XElement(“Address”,”123 Anywhere”));records1.Add(record1);recs.Add(records1);which should create an xml document looking like this:<Records><Record><id>1</id><Name>Test</Name><Address>123 Anywhere</Address></Record></Records> […]

Read More