Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to January 2008 Entries
Using Asp:menu and XmlDataSource
I've started to use Asp:menu with XmlDataSource based on Quick Start Example. To show many top level elements I tried to specify XPath, but failed to do it correctly(probably due to missing XML namespace). So I changed the XML schema aa suggested in Asp.Net Menu Control Binding with XMLDataSource and used XPath="/Home/Menu" to not show single root Item. Unfortunately DataBinding doesn't support default properties in XML file.All nodes must have all attributes, specified in DataBinding section. Otherwise ......

Posted On Wednesday, January 30, 2008 9:33 AM

Problems after Installing VS 2008 side-by-side with VS 2005
I have Visual Studio 2005 environment and decided to try VS 2008. I've read some articles(e.g. here) about site-by-site installation and had an impression, that making a copy of solution is enough. NOTE: If you are using TFS, before conversion of the existing solution, obtain and install Team Explorer Client . VS 2005 is using TFS Source Control, but VS 2008 shows no Source Control plug-in installed. . After installing of VS 2008 I've copied my existing solution as MySolution2008 and opened it in ......

Posted On Monday, January 28, 2008 11:59 AM

WCF vs .Net remoting Notes
We are using .Net remoting now between Web Server and Application Server farms. I am consider to use WCF for new modules. Good news: The WCF and .NET Remoting are really comparable in performance. and according to MSDN article A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies WCF even approximately 25% faster. I hope to extend this post when I will collect more info ......

Posted On Thursday, January 24, 2008 12:49 AM

DateTime value in DataSet changed over remoting boundaries.
We are using .Net remoting(.Net framework 2.0) to pass DataSet from application server to web server. It was noticed that if DateTime field in DataSet has '2008-10-26 02am" value, during remoting it is changed to '2008-10-26 03am". I beleive that it is somehow relates to Daylight Saving time change. We didn't noticed any changes for other DateTime values. According to Western Australia (Perth) has time change 26-Oct, 02:00h. However the servers with the ......

Posted On Wednesday, January 23, 2008 9:31 AM

Insert new lines in XML text using Visual Studio.
UPDATE: I've recently was adviced that I can use VS command Edit/Advanced/Format Document(Ctrl-K,Ctrl-D) and it does better formating. I 've got XML files as one long string, not formatted. IE explorer shows them nicely with all indentation and ablility to collapse parts. However to edit or compare files using Windiff or Winmerge it will be convinient to have them with short lines, e.g. each element in a new line. Fortunately VS has ability to insert new lines in replace operation. 1.Click Ctrl-H ......

Posted On Monday, January 21, 2008 7:48 PM

Html Form inside ASP.Net page causes no postbacks
I needed to re-design an existing page to include new html, created by third party designer. After I've done the changes, I found that postbacks are not working. It took me a while to understand that the cause of the problem is an html form, included in the main ASP.Net form like the following: <form method="post" action="about/subscribe/" id="Mail"><input type="text" value="Enter your email address" name="mail" class="field-subscribe"/> <input type="image" align="middle" class="field-go" ......

Posted On Thursday, January 17, 2008 6:08 PM

Community Content Top Contributor Award
I have been selected to receive one of 20 Community Content Top Contributor Awards for your contributions to the MSDN wiki in 2007. Good news. I've tried to find in MSDN how many topics I've added and it wasn't easy. MSDN Library shows only top 5. My profile doesn't show it. I had to search MSDN for my name, open the topic, open each version to find my post and then click on my name. Now I know the pattern For today I have: ......

Posted On Wednesday, January 16, 2008 10:32 PM

Function to Strip Html Tags
I have a string that include HTML tags <B> font etc. I want to Strip Html Tags to show the string as tooltip. Thanks to HtmlAgilityPack it is easy: public static string StripHtmlTags(string html) { if(String.IsNullOrEmpty(html)) return ""; HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocumen... doc.LoadHtml(html); return doc.DocumentNode.InnerText; } ......

Posted On Wednesday, January 16, 2008 10:47 AM

TableCell.Text property is ignored if there are child controls
I wanted to dynamically create content of ASP.NET TableCell control. It should have some text and image. I've tried to use the code cell.Text = "Text"; cell.AddControls(imgControl); But the text wasn't shown. The reason is that if TableCell has child controls, the text value is ignored during rendering. See TableCell.RenderContents in Reflector. The valid way is the following: Label lbl=new Label(); lbl.Text=text; cell.Controls.Add(lbl); cell.AddControls(imgControl) ......

Posted On Thursday, January 10, 2008 11:03 AM

Passing null parameters to String.Format is safe
I wanted to use String.Format with parameters that can be null. Firstly i decided to put some conditional code like if(arg1!=null) but then desided to check, if it is handled automatically. And from Reflector it looks that it handles nulls if (str2 == null) { str2 = string.Empty; } So it safe to write code like String.Format("({0}{1})", a1,a2 ) , even if some parameters are null ......

Posted On Wednesday, January 9, 2008 3:54 PM

View html source in "Reporting Services" Report Design Preview

When I am using Report Design Preview in "Reporting Services" , I often want to view html source( in particular generated URLs), but Context Menu doesn't give me the option.
However I can select "Export/Web Archive" and save report as MHTML, than view it in IE. 

I feel that it is quicker than deploy the report to the server.

Posted On Thursday, January 3, 2008 10:51 AM

Copyright © Michael Freidgeim | Powered by: