<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>vs2005 &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/vs2005/</link>
	<description>Feed of posts on WordPress.com tagged "vs2005"</description>
	<pubDate>Sat, 28 Nov 2009 06:38:16 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Google-like site search in Visual Basic]]></title>
<link>http://loganyoung.wordpress.com/2009/10/15/google-like-site-search-in-visual-basic/</link>
<pubDate>Thu, 15 Oct 2009 07:17:02 +0000</pubDate>
<dc:creator>loganyoung</dc:creator>
<guid>http://loganyoung.wordpress.com/2009/10/15/google-like-site-search-in-visual-basic/</guid>
<description><![CDATA[For a long time, I wondered how to organise a search feature on my site. I could never figure it out]]></description>
<content:encoded><![CDATA[For a long time, I wondered how to organise a search feature on my site. I could never figure it out]]></content:encoded>
</item>
<item>
<title><![CDATA[Error al pasar un sitio web a una aplicación web en ASP.NET]]></title>
<link>http://fravelgue.wordpress.com/2009/09/14/error-al-pasar-un-sitio-web-a-una-aplicacion-web-en-asp-net/</link>
<pubDate>Mon, 14 Sep 2009 18:20:46 +0000</pubDate>
<dc:creator>fravelgue</dc:creator>
<guid>http://fravelgue.wordpress.com/2009/09/14/error-al-pasar-un-sitio-web-a-una-aplicacion-web-en-asp-net/</guid>
<description><![CDATA[Muchas veces con los proyectos ASP.NET tenemos el problema de que los controles de usuario definidos]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Muchas veces con los proyectos ASP.NET tenemos el problema de que los controles de usuario definidos en el diseñador no aparecen definidas en la vista de código.</p>
<p><a href="http://fravelgue.wordpress.com/files/2009/09/converttowebapplication.png"><img class="alignnone size-medium wp-image-454" title="convertToWebApplication" src="http://fravelgue.wordpress.com/files/2009/09/converttowebapplication.png?w=300" alt="convertToWebApplication" width="300" height="230" /></a></p>
<p>Esto suele pasar al <a href="http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx">migrar Sitios Web a Aplicaciones Web en ASP.NET</a>, y se debe básicamente a que no se recompilan los archivos .aspx.designer.cs. Para solucionarlo sólo tenemos que ir al proyecto y con botón derecho, elegir la opción</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[VB.NET Sort Method for a Collection Class]]></title>
<link>http://malakablog.wordpress.com/2009/08/04/vb-net-sort-method-for-a-collection-class/</link>
<pubDate>Tue, 04 Aug 2009 16:48:21 +0000</pubDate>
<dc:creator>malakablog</dc:creator>
<guid>http://malakablog.wordpress.com/2009/08/04/vb-net-sort-method-for-a-collection-class/</guid>
<description><![CDATA[I have a VB.NET collection class EmployeesCollection for an Employee Class that got an Integer Prope]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><br />
I have a VB.NET collection class EmployeesCollection for an Employee Class that got an Integer Property named Age; I want to create a method (SortByAge) to sort the collection members by Age.</span></p>
<p> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><br />
This is the EmployeesCollection Class:</span></p>
<p> <code></p>
<p>Imports Microsoft.VisualBasic</p>
<p>    Public Class EmployeesCollection<br />
        Inherits System.Collections.CollectionBase</p>
<p>        Public Sub Add(ByVal tblEmployee As Employee)<br />
            ' Invokes Add method of the List object to add a widget.<br />
            List.Add(tblEmployee)<br />
        End Sub</p>
<p>        Public ReadOnly Property Item(ByVal index As Integer) As Employee<br />
            Get<br />
                ' The appropriate item is retrieved from the List object and<br />
                ' explicitly cast to the Widget type, then returned to the<br />
                ' caller.<br />
                Return CType(List.Item(index), Employee)<br />
            End Get<br />
        End Property</p>
<p>    End Class<br />
 </code></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><br />
To create the SortByAge method I need a SortHelper Class, This helper Class will include a Function called Compare to compare between the Age values of the employees, the SortHelper Class will be part of the EmployeesCollection Class.</span></p>
<p> </p>
<p> <code><br />
Private Class AgeSortHelper<br />
        Implements IComparer</p>
<p>        Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer _<br />
             Implements System.Collections.IComparer.Compare<br />
            If x.Age &#62; y. Age Then<br />
                Return 1<br />
            End If</p>
<p>            If x. Age &#60; y. Age Then<br />
                Return -1<br />
            End If</p>
<p>            Return 0<br />
        End Function<br />
    End Class<br />
</code><br />
 </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><br />
Now we need to create the SortByAge method for the EmployeesCollection Class, in this method we will use the AgeSortHelper to sort the Employees.</span></p>
<p> <code></p>
<p>    Public Sub SortByAge()<br />
        Dim sorter As System.Collections.IComparer = New AgeSortHelper()<br />
        InnerList.Sort(sorter)<br />
    End Sub</p>
<p> </code></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">This is the Final EmployeesCollection Class:</span></p>
<p> <code></p>
<p>Imports Microsoft.VisualBasic</p>
<p>Public Class EmployeesCollection<br />
    Inherits System.Collections.CollectionBase</p>
<p>    Public Sub Add(ByVal tblEmployee As Employee)<br />
        ' Invokes Add method of the List object to add a widget.<br />
        List.Add(tblEmployee)<br />
    End Sub</p>
<p>    Public ReadOnly Property Item(ByVal index As Integer) As Employee<br />
        Get<br />
            ' The appropriate item is retrieved from the List object and<br />
            ' explicitly cast to the Widget type, then returned to the<br />
            ' caller.<br />
            Return CType(List.Item(index), Employee)<br />
        End Get<br />
    End Property</p>
<p>    Public Sub SortByAge()<br />
        Dim sorter As System.Collections.IComparer = New AgeSortHelper()<br />
        InnerList.Sort(sorter)<br />
    End Sub<br />
   <br />
    Private Class AgeSortHelper<br />
        Implements IComparer</p>
<p>        Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer _<br />
             Implements System.Collections.IComparer.Compare<br />
            If x.Age &#62; y. Age Then<br />
                Return 1<br />
            End If</p>
<p>            If x. Age &#60; y. Age Then<br />
                Return -1<br />
            End If</p>
<p>            Return 0<br />
        End Function</p>
<p>    End Class<br />
End Class<br />
</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ejemplo de código de página de contacto en C#]]></title>
<link>http://fmadriaga.wordpress.com/2009/08/02/ejemplo-de-codigo-de-pagina-de-contacto-en-c/</link>
<pubDate>Sun, 02 Aug 2009 19:06:08 +0000</pubDate>
<dc:creator>fmadriaga</dc:creator>
<guid>http://fmadriaga.wordpress.com/2009/08/02/ejemplo-de-codigo-de-pagina-de-contacto-en-c/</guid>
<description><![CDATA[Voy a poner como ejemplo la página de contacto de www.nmsoft.com.uy, es una página simple pero muest]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Voy a poner como ejemplo la página de contacto de <a href="http://www.nmsoft.com.uy/">www.nmsoft.com.uy</a>, es una página simple pero muestra perfectamente el funcionamiento.<br />
La siguiente imagen muestra la vista de diseño en VS2005 con los nombres correspondientes para cada objeto.</p>
<p><a href="http://www.nmsoft.com.uy/"><img title="imgContacto" src="http://fmadriaga.wordpress.com/files/2009/08/imgcontacto2.jpg?w=286" alt="Formulario de contacto en vista de diseño del sitio de NMS@ft" width="286" height="300" /></a><br />
<em><span style="color:#666699;">Formulario de contacto en vista de diseño del sitio de <a href="http://www.nmsoft.com.uy/">NMS@ft</a></span></em></p>
<p>En esta imagen se ven los correspondientes Labels para la identificación de cada campo, los TextBox para las entradas, aplicandole al TextBox del campo Mensaje (txtMensaje) el valor MultiLine a la propiedad TextMode, las Labels para el control de errores y por su puesto el boton enviar.</p>
<p>El siguiente código es del botón Enviar (btnEnviar):</p>
<p><span style="color:#666699;"><em>protected void btnEnviar_Click(object sender, EventArgs e)<br />
{<br />
Session["Asunto"] = txtAsunto.Text.ToString();<br />
lblENombre.Text = &#8220;&#8221;;<br />
lblEMail.Text = &#8220;&#8221;;<br />
lblETelefono.Text = &#8220;&#8221;;<br />
lblEAsunto.Text = &#8220;&#8221;;<br />
lblEnviado.Text = &#8220;&#8221;;<br />
if (txtNombre.Text == &#8220;&#8221;)<br />
{<br />
lblENombre.Text = &#8220;¿No tienes nombre?&#8221;;<br />
}<br />
else if (txtMail.Text == &#8220;&#8221; &#38;&#38; txtTelefono.Text==&#8221;")<br />
{<br />
lblEMail.Text = &#8220;Dejanos al menos un e-mail,&#8221;;<br />
lblETelefono.Text = &#8220;o un teléfono para comunicarnos.&#8221;;<br />
}<br />
else if (txtAsunto.Text == &#8220;&#8221;)<br />
{<br />
lblEAsunto.Text = &#8220;¿De que se trata el mensaje?&#8221;;<br />
}<br />
else if (txtMensaje.Text == &#8220;&#8221;)<br />
{<br />
lblEnviado.Text = &#8220;¿Que es lo que deseas consultar?&#8221;;<br />
}<br />
else<br />
{<br />
try<br />
{<br />
MailMessage email = new MailMessage();</em></span></p>
<p><span style="color:#666699;"><em>//Datos necesarios para el envío del mensaje<br />
email.From = new MailAddress(txtMail.Text);<br />
email.To.Add(&#8220;ventas@tuempresa.com&#8221;);<br />
email.Subject = txtAsunto.Text;<br />
email.Body = txtMensaje.Text;</em></span></p>
<p><span style="color:#666699;"><em>//Servidor de correo<br />
SmtpClient smtp = new SmtpClient(&#8220;servidor.tuempresa.com&#8221;);</em></span></p>
<p><span style="color:#666699;"><em>//E-Mail y password halla creado en el panel de control, puede ser una cuenta que no utilices, crearla simplemente como credencial.<br />
smtp.Credentials = new System.Net.NetworkCredential(&#8220;auxiliar@tuempresa.com&#8221;, &#8220;contraseña&#8221;);<br />
smtp.UseDefaultCredentials = false;</em></span></p>
<p><span style="color:#666699;"><em>//Enviar el correo<br />
smtp.Send(email);</em></span></p>
<p><span style="color:#666699;"><em>//Mostrar la etiqueta &#8220;Enviado&#8221;<br />
lblEnviado.Visible = true;<br />
//Redireccionamos a la página de confirmación de envío del mensaje<br />
Response.Redirect(&#8220;~/Mensaje-Enviado.aspx&#8221;);</em></span></p>
<p><span style="color:#666699;"><em>//Limpiar los campos para posteriores mensajes<br />
Session["Asunto"] = null;<br />
txtNombre.Text = &#8220;&#8221;;<br />
txtMail.Text = &#8220;&#8221;;<br />
txtTelefono.Text = &#8220;&#8221;;<br />
txtAsunto.Text = &#8220;&#8221;;<br />
txtMensaje.Text = &#8220;&#8221;;<br />
}<br />
catch<br />
{<br />
lblEMail.Text = &#8220;No fué posible envíar el mensaje, verifica el E-Mail detallado.&#8221;;<br />
}<br />
}<br />
}<br />
</em></span></p>
<p>La primer sentencia de la variable Session["Asunto"] es simplemente para una facilitación de ingreso de datos en el campo asunto desde otras páginas.<br />
Las asignaciones de las Labels están para limpiar los errores detallados en la instancia anterior.<br />
Las sentencias if a continuación un control básico de errores, siendo obligatorios todos los campos excepto los campos Mail y Teléfono que son optativos.</p>
<p>Espero les haya sido de utilidad, y como agradecer no cuesta nada, comenten.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Team Foundation Server &ndash; Prozess Template anpassen]]></title>
<link>http://peroxide20.wordpress.com/2009/07/27/team-foundation-server-prozess-template-anpassen/</link>
<pubDate>Mon, 27 Jul 2009 11:05:51 +0000</pubDate>
<dc:creator>peroxide20</dc:creator>
<guid>http://peroxide20.wordpress.com/2009/07/27/team-foundation-server-prozess-template-anpassen/</guid>
<description><![CDATA[Wer sich schon immer gefragt hat wie man das Prozess Template anpassen kann kommt auf keinen Fall am]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Wer sich schon immer gefragt hat wie man das Prozess Template anpassen kann kommt auf keinen Fall am “Process Template Manager” des TFS vorbei.</p>
<p>Zu finden ist dieser im “Team Explorer” (z.B. Visual Studio 2005/2008 öffnen) und das Team Explorer Fenster anzeigen (View &#62; Team Explorer). Wenn man dort den TFS Server eingetragen hat, kann man den “Process Template Manager” unter “Team Foundation Server Settings” finden.</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager.jpg" target="_blank"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="processtemplatemanager" border="0" alt="processtemplatemanager" src="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager_thumb.jpg?w=260&#038;h=187" width="260" height="187" /></a>&#160; <br /><strong>Process Template Manager starten</strong></p>
<p>Im Manager kann man dann komplette Templates Hoch- und Runterladen sowie löschen. </p>
<p><a href="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager1.jpg" target="_blank"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="processtemplatemanager1" border="0" alt="processtemplatemanager1" src="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager1_thumb.jpg?w=260&#038;h=192" width="260" height="192" /></a>    <br /><strong>Process Template Manager</strong> </p>
<p>Ein Prozess-Template besteht aus einer Reihe Ordner und Dateien (viel XML). Zum Anpassen eines Templates kann man z.B. ein vorhandenes (Standard-Template bei TFS Installation oder z.B. von <a href="http://mpt.codeplex.com/" target="_blank">Codeplex</a>) in einen lokalen Ordner herunterladen und an der gewünschten Stelle mit Visual Studio bearbeiten.</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager2.jpg" target="_blank"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="processtemplatemanager2" border="0" alt="processtemplatemanager2" src="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager2_thumb.jpg?w=260&#038;h=194" width="260" height="194" /></a>     <br /><strong>Ordnerstruktur eines TFS Process Templates</strong></p>
<p>Visual Studio unterstützt sowohl bei der Bearbeitung von Feldern, Layouts, Workflows und Workitem Typen. Das ganze kann man beliebig Komplex betreiben und ist sicher Inhalt vieler weiterer Blogeinträge, Artikel, …</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager3.jpg" target="_blank"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="processtemplatemanager3" border="0" alt="processtemplatemanager3" src="http://peroxide20.files.wordpress.com/2009/07/processtemplatemanager3_thumb.jpg?w=260&#038;h=187" width="260" height="187" /></a>&#160; <br /><strong> TFS Process Template im Visaul Studio bearbeiten</strong></p>
<p><strong></strong>    <br />Hat man nun seine gewünschten Änderungen vorgenommen lädt man das angepasste Template über den Process Template Manager wieder hoch (Auswahl des Ordners wo die “ProcessTemplate.xml” liegt). Zuvor sollte man die Bezeichnung des Templates anpassen. War der Upload erfolgreich kann man nun ein neues Projekt mit dem gewünschten Template anlegen.</p>
<p>Viel Spaß beim ersten anpassen eines Templates.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CREATING A CRYSTAL REPORT WITHOUT A DATASOURCE]]></title>
<link>http://gilbertadjin.wordpress.com/2009/06/27/creating-a-crystal-report-without-a-datasource/</link>
<pubDate>Sat, 27 Jun 2009 11:41:15 +0000</pubDate>
<dc:creator>Gilbert Adjin Frimpong</dc:creator>
<guid>http://gilbertadjin.wordpress.com/2009/06/27/creating-a-crystal-report-without-a-datasource/</guid>
<description><![CDATA[If you want to generate crystal reports without using database tables, stored procedures, datasets b]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you want to generate crystal reports without using database tables, stored procedures, datasets but you want to generate reports with direct user inputs, for example printing receipts directly from user inputs, then here is your stop. It is all about using parameters. It is assumed you know how to generate reports with crystal reports.</p>
<p>Below is a simple procedure for you to do so.</p>
<p>To start with</p>
<p>Add a new crystal report document to your&#160;&#160; project by choosing a blank report. Also create a form and add a <strong>crystalreportviewer</strong> to it. Design your report by creating the needed parameters that the report will accept from the user. For example as shown below</p>
<p><img class="alignnone size-full wp-image-101" title="no datasource" alt="no datasource" src="http://gilbertadjin.wordpress.com/files/2009/06/no-datasource.jpg" width="571" height="351" /></p>
<p>Then add the method below to a click event. Don’t forget to do these imports</p>
<p>1.&#160; Imports CrystalDecisions.CrystalReports.Engine</p>
<p>2. Imports CrystalDecisions.Shared</p>
<p>Private Sub printfees()</p>
<p>Dim rpd As New ReportDocument</p>
<p>&#8216;loading the report from a specified location</p>
<p>rpd.Load(Application.StartupPath &#38; &#34;\reports\rptPaymentReceipt.rpt&#34;)</p>
<p>&#8216;assigning values to your report parameters</p>
<p>rpd.SetParameterValue(&#34;prog&#34;, Me.txtProgram.Text)</p>
<p>rpd.SetParameterValue(&#34;sname&#34;, Me.txtName.Text.Replace(&#34;&#8211;&#34;, &#34;&#34;).Trim)</p>
<p>rpd.SetParameterValue(&#34;acadyear&#34;, &#34;Year: &#34; &#38; Me.lblYear.Text &#38; &#34; Sem:&#160; &#34; &#38; Me.lblSemester.Text)</p>
<p>rpd.SetParameterValue(&#34;pdate&#34;, CDate(Me.dtpPaid.Value))</p>
<p>rpd.SetParameterValue(&#34;indexno&#34;, Me.txtIndexNo.Text)</p>
<p>rpd.SetParameterValue(&#34;ptype&#34;, Me.dspaytype.Rows(Me.cmbPaytype.SelectedIndex)(1).ToString)</p>
<p>&#8216;frmReportsFace is a form with a crystalreportsviewer called crv1</p>
<p>Dim f As New frmReportsFace</p>
<p>f.crv1.ReportSource = rpd</p>
<p>&#8216;below is a method to make your crystal reports independent on a ‘patrticular database server</p>
<p>SetDBLogonForReport(rpd)</p>
<p>f.Show()</p>
<p>End Sub</p>
<p>&#8216; a method that makes your crsystal reports independent on the database sever</p>
<p>Private Sub SetDBLogonForReport(ByVal myReportDocument As ReportDocument)</p>
<p>Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()</p>
<p>&#8216;dbase is a class to return certain information about databases,</p>
<p>myConnectionInfo.DatabaseName = dbase.getDataname</p>
<p>myConnectionInfo.UserID = dbase.getUName</p>
<p>myConnectionInfo.Password = dbase.getdbasePassword</p>
<p>myConnectionInfo.ServerName = dbase.getServerName</p>
<p>myConnectionInfo.IntegratedSecurity = dbase.getIntegratedSecurity</p>
<p>myConnectionInfo.AllowCustomConnection = True</p>
<p>Dim myTables As Tables = myReportDocument.Database.Tables</p>
<p>For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables</p>
<p>Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo</p>
<p>myTableLogonInfo.ConnectionInfo = myConnectionInfo</p>
<p>myTable.ApplyLogOnInfo(myTableLogonInfo)</p>
<p>Next</p>
<p>End Sub</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Could not execute CVTRES.EXE]]></title>
<link>http://imak47.wordpress.com/2009/06/07/could-not-execute-cvtres-exe/</link>
<pubDate>Sun, 07 Jun 2009 12:45:27 +0000</pubDate>
<dc:creator>Imran Akram</dc:creator>
<guid>http://imak47.wordpress.com/2009/06/07/could-not-execute-cvtres-exe/</guid>
<description><![CDATA[Today I started woking on a windows application at home and I was very annoyed by the error I was ge]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today I started woking on a windows application at home and I was very annoyed by the error I was getting whenever I tried to debug/build the application that said: &#8220;<strong>Could not execute CVTRES.EXE</strong>&#8220;</p>
<p>Tried lots of things like giving full rights to &#8220;everyone&#8221;  on the debug folder and some other silly things, untill I found out that there was something there was something in ZoneAlarm that was causing the problem. I had to uninstall and re-install ZoneAlarm. Turning it off was not sufficient. I never understood what was causing the problem at that time and to be honest I&#8217;m not too concerned with that either. May be there was some setting that needed a reset or something. But anyway like they say: &#8220;All is well that ends well&#8221;!</p>
<p>Hope some of you might find this useful someday.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Visual Studio/VB.NET: How To Easily Document Your Code]]></title>
<link>http://dotnetdiscussion.net/2009/05/20/visual-studiovb-net-how-to-easily-document-your-code/</link>
<pubDate>Wed, 20 May 2009 22:36:51 +0000</pubDate>
<dc:creator>Some.Net(Guy)</dc:creator>
<guid>http://dotnetdiscussion.net/2009/05/20/visual-studiovb-net-how-to-easily-document-your-code/</guid>
<description><![CDATA[If you&#8217;re a routine Visual Studio user like me, I don&#8217;t need to tell you how awesome Int]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you&#8217;re a routine Visual Studio user like me, I don&#8217;t need to tell you how awesome Intellisense is. Not only would some of us be lost without it, but it also helps us be way more efficient programmers either through simple selection of methods or properties or by discovering new object members that maybe we didn&#8217;t know about previously. Additionally, one of the main benefits of Intellisense is that it tells you  <em>about</em> the item in question, for instance, that the String.IsNullOrEmpty() function &#8220;Indicates whether the specified System.String object is null or an System.String.Empty string.&#8221;</p>
<p><img class="aligncenter size-full wp-image-106" title="Visual Studio Intellisense" src="http://dotnetdiscussion.wordpress.com/files/2009/05/intellisense.gif" alt="Visual Studio Intellisense" width="451" height="187" /></p>
<p>When writing my own objects, however, I used to find myself yearning for this kind of help for my own functions. Wouldn&#8217;t it be great to get Intellisense to tell me what that &#8220;GetUserInfo&#8221; function I wrote five weeks ago does rather than me having to go look it up? What about what those parameter names mean? Luckily, there is a way, and it is super easy.</p>
<p>For example, let&#8217;s say you have an object that returns its own permalink in a shared function called <code>GetHTMLPermaLink()</code>. To document it, simply place your cursor above the function and press the apostrophe key three times: <code>'''</code>. Automagically, the following pops up:</p>
<p><img src="http://dotnetdiscussion.wordpress.com/files/2009/05/documentation.gif" alt="Function Documentation" title="Function Documentation" width="452" height="167" class="aligncenter size-full wp-image-109" /></p>
<p>All you have to do is fill in the blanks and viola, you have documented code! (NOTE: in C#, I believe the syntax is <code>///</code> but I&#8217;m not sure.) To see this in action, after you fill in the appropriate information, go try to pull up your function somewhere and watch the magic:</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-106" title="Visual Studio Intellisense" src="http://dotnetdiscussion.wordpress.com/files/2009/05/intellisense2.gif" alt="Visual Studio Intellisense" /></p>
<p>More information on <a href="http://aspalliance.com/696_Code_Documentation_in_NET" target="_blank">Visual Studio Code Documentation (C#)</a></p>
<p>Happy documenting!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[用VS2005接上SAP #2]]></title>
<link>http://mr17blog.wordpress.com/2009/05/14/%e7%94%a8vs2005%e6%8e%a5%e4%b8%8asap-2/</link>
<pubDate>Thu, 14 May 2009 05:47:09 +0000</pubDate>
<dc:creator>Mr17</dc:creator>
<guid>http://mr17blog.wordpress.com/2009/05/14/%e7%94%a8vs2005%e6%8e%a5%e4%b8%8asap-2/</guid>
<description><![CDATA[當接上SAP後，就可以利用Remote Function Module (RFM)或Business APIs (BAPIs)去讀取SAP data。如果用RFM，要SAP那個Function Mod]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>當接上SAP後，就可以利用Remote Function Module (RFM)或Business APIs (BAPIs)去讀取SAP data。如果用RFM，要SAP那個Function Module 選擇 Remote-Enable function (Function builder SE37 -&#62; Attributes -&#62; Processing Type)。如用BAPI便要在Add Reference加入SAPBAPIControlLib.dll。以下以call BAPI_COMPANYCODE_GETLIST為例子。</p>
<p>if (conn.Logon(0, true))<br />
{</p>
<p>SAPFunctionsOCX.SAPFunctionsClass func = new SAPFunctionsOCX.SAPFunctionsClass();<br />
func.Connection = conn;<br />
SAPFunctionsOCX.IFunction ifunc = (SAPFunctionsOCX.IFunction)func.Add(&#8220;BAPI_COMPANYCODE_GETLIST&#8221;);<br />
ifunc.Call();<br />
SAPTableFactoryCtrl.Tables tables = (SAPTableFactoryCtrl.Tables)ifunc.Tables;<br />
SAPTableFactoryCtrl.Table ENQ = (SAPTableFactoryCtrl.Table)tables.get_Item(&#8220;COMPANYCODE_LIST&#8221;);</p>
<p>if (ENQ != null)<br />
{<br />
int n = ENQ.RowCount;</p>
<p>LabelRowCount.Text = n.ToString();</p>
<p>DataTable dt = new DataTable();<br />
dt.Columns.Add(&#8220;COMP_CODE&#8221;);<br />
dt.Columns.Add(&#8220;COMP_NAME&#8221;);</p>
<p>for (int i = 1 ; i &#60;= n; i++)<br />
{<br />
DataRow dr = dt.NewRow();<br />
dr["COMP_CODE"] = ENQ.get_Cell(i, &#8220;COMP_CODE&#8221;).ToString();<br />
dr["COMP_NAME"] = ENQ.get_Cell(i, &#8220;COMP_NAME&#8221;).ToString();<br />
dt.Rows.Add(dr);<br />
}<br />
GridView1.DataSource = dt;<br />
GridView1.DataBind();<br />
GridView1.Visible = true;<br />
}<br />
else<br />
LabelLabelRowCount.Text = &#8220;0&#8243;;<br />
}<br />
else<br />
{<br />
LabelStatus.Text = &#8220;Fail!&#8221;;<br />
}<br />
conn.Logoff();<br />
}</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Project Conversion Bug in VS2008]]></title>
<link>http://nibuthomas.com/2009/05/11/project-conversion-bug-in-vs2008/</link>
<pubDate>Mon, 11 May 2009 12:55:59 +0000</pubDate>
<dc:creator>Nibu Thomas</dc:creator>
<guid>http://nibuthomas.com/2009/05/11/project-conversion-bug-in-vs2008/</guid>
<description><![CDATA[Are you having trouble with VS2008 after conversion from VS2005 to VS2008? Most common complaints ar]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Are you having trouble with VS2008 after conversion from VS2005 to VS2008? Most common complaints are that the executable is way to slow when compared to it&#8217;s counterpart generated with VS2005. The reason for this is given in this MSDN forum thread have a look&#8230;</p>
<p><a title="Reason for VC9 builds being slower than VC8 builds..." href="http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fb32033b-7bad-439b-a94c-943a17f0cbb2" target="_blank">http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fb32033b-7bad-439b-a94c-943a17f0cbb2</a></p>
<p>The essence of this thread is given below (quote from the thread, thanks to <a rel="nofollow" href="http://social.msdn.microsoft.com/Forums/en-US/user?user=Jon%20Baggott" target="_blank"><span class="name">Jon Baggott</span></a>)&#8230;</p>
<address> </address>
<address>In Visual Studio 2008 SP1 (SP1 not RTM) there is a serious bug with /O2 optimization. One way this bug can be triggered is by upgrading a project from a previous version. Even though the project setting shows the release build is set to /O2, the build can be not optimized at all. To work around it you have to change the setting to no optimization, apply, and then change it back to /O2. The quick way to see if this is needed is to check whether the setting for optimization is in bold or regular &#8211; if&#8217;s it&#8217;s bold you&#8217;re OK; if it&#8217;s regular text you&#8217;re not. This bug has been reported to Microsoft by many people over the past few months via the Connect feedback site but every case has been closed by them without doing anything and for completely invalid reasons.</address>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DYNAMIC CONNECTION STRINGS IN VB.NET]]></title>
<link>http://gilbertadjin.wordpress.com/2009/04/02/connection-strings-in-vbnet/</link>
<pubDate>Thu, 02 Apr 2009 07:05:21 +0000</pubDate>
<dc:creator>Gilbert Adjin Frimpong</dc:creator>
<guid>http://gilbertadjin.wordpress.com/2009/04/02/connection-strings-in-vbnet/</guid>
<description><![CDATA[To change the connection string of a typed dataset in vb.net 2005 and also Building a dynamic connec]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p class="MsoNormal">To change the connection string of a typed dataset in vb.net 2005 and also Building a dynamic connection strings in Vb.net. Below are easy ways these can be done.</p>
<p class="MsoListParagraphCxSpFirst">
<p class="MsoListParagraphCxSpFirst">1. To change the connection string of a typed dataset, add the method below to the setting file. To see the setting.vb file, go the your project properties, on the settings tab, click on the the view code button and there you go.</p>
<p style="line-height:normal;margin:0 0 0 .5in;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">Private</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">Sub</span> MySettings_SettingsLoaded(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> <span style="color:blue;">Object</span>, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.Configuration.SettingsLoadedEventArgs) <span style="color:blue;">Handles</span> <span style="color:blue;">Me</span>.SettingsLoaded</span></p>
<p style="line-height:normal;margin:0 0 0 .5in;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">Dim</span><span style="font-family:&#34;font-size:10pt;"> db <span style="color:blue;">As</span> <span style="color:blue;">New</span> DBConnect</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;"><span style="color:#333333;"></span>Me</span>.Item(<span style="color:maroon;">&#34;HospitalConnectionString&#34;</span>)&#160; =db.returnConnectionString</span></p>
<p style="text-indent:.5in;" class="MsoNormal"><span style="line-height:115%;font-family:&#34;color:blue;font-size:10pt;">End</span><span style="line-height:115%;font-family:&#34;font-size:10pt;"> <span style="color:blue;">Sub</span></span></p>
<p style="margin-left:.5in;" class="MsoNormal"><strong>Note: <span style="line-height:115%;font-family:&#34;color:maroon;font-size:10pt;">HospitalConnectionString </span></strong><span style="line-height:115%;font-family:&#34;font-size:10pt;"><strong>is the name of the connections string as saved in your project settings       <br /></strong></span></p>
<p style="margin-left:.5in;" class="MsoNormal"><strong>Below is the detail of the “<span style="line-height:115%;font-family:&#34;font-size:10pt;">returnConnectionString” procedure</span></strong></p>
<p style="margin-left:.5in;" class="MsoNormal"><span style="line-height:115%;font-family:&#34;font-size:10pt;"><strong>Also note that servername, username, database, password are all saved in the settings</strong></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;"></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">Public</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">function</span> returnConnectionString ()as string</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Try</span></span><span style="font-family:&#34;font-size:10pt;"> </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">client = getClientName()</span></p>
<p style="line-height:normal;margin:0 0 0 .5in;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">With</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">My</span>.Settings</span></p>
<p style="line-height:normal;margin:0 0 0 .5in;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">If</span> .servername = client <span style="color:blue;">Then</span></span></p>
<p style="line-height:normal;margin:0 0 0 1.5in;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">If</span> <span style="color:blue;">Me</span>.integratedSecurity = <span style="color:blue;">False</span> <span style="color:blue;">Then</span></span></p>
<p style="line-height:normal;margin:0 0 0 1.5in;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">connectionString = <span style="color:maroon;">&#34;Data source= &#34;</span> &#38; .servername &#38; <span style="color:maroon;">&#34;; initial catalog= &#34;</span> &#38; .database &#38; <span style="color:maroon;">&#34;;user id= &#34;</span> &#38; .username &#38; <span style="color:maroon;">&#34; ;password = &#34;</span> &#38; .password</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Else</span></span></p>
<p style="line-height:normal;margin:0 0 0 1.5in;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">connectionString = <span style="color:maroon;">&#34;Data source= &#34;</span> &#38; servername &#38; <span style="color:maroon;">&#34;; initial catalog= &#34;</span> &#38; database &#38; <span style="color:maroon;">&#34;; Integrated Security= &#34;</span> &#38; integratedSecurity</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">End</span> <span style="color:blue;">If</span></span><span style="font-family:&#34;color:blue;font-size:10pt;"> </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Else</span></span></p>
<p style="line-height:normal;margin:0 0 0 1.5in;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">connectionString = <span style="color:maroon;">&#34;workstation id= &#34;</span> &#38; client &#38; <span style="color:maroon;">&#34; ;Data source= &#34;</span> &#38; servername &#38; <span style="color:maroon;">&#34; ;initial catalog= &#34;</span> &#38; database &#38; <span style="color:maroon;">&#34; ;user id= &#34;</span> &#38; username &#38; <span style="color:maroon;">&#34; ;password = &#34;</span> &#38; password &#38; <span style="color:maroon;">&#34; ;Integrated Security=&#34;</span> &#38; integratedSecurity &#38; <span style="color:maroon;">&#34; ; Connect TimeOut=30&#34;</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">End</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">With</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> Exception</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">Msgbox(ex.ToString)</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span><span style="font-family:&#34;color:blue;font-size:10pt;"> </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">Return connectonString</span></p>
<p class="MsoNormal"><span style="line-height:115%;font-family:&#34;color:blue;font-size:10pt;">End</span><span style="line-height:115%;font-family:&#34;font-size:10pt;"> <span style="color:blue;">function</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;     <br /></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><strong>A function to return the name of the current machine(the machine the program is running on)</strong></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">Public</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">Function</span> getClientName() <span style="color:blue;">As</span> <span style="color:blue;">String</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Dim</span> client <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:maroon;">&#34;&#34;</span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">client = Dns.GetHostName</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;"><span style="color:blue;">Return</span> client</span></p>
<p class="MsoNormal"><span style="line-height:115%;font-family:&#34;color:blue;font-size:10pt;">End</span><span style="line-height:115%;font-family:&#34;font-size:10pt;"> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><strong><span style="line-height:115%;font-family:&#34;font-size:12pt;">Saving items in the Settings</span></strong></p>
<p class="MsoNormal"><strong><span style="line-height:115%;font-family:&#34;font-size:10pt;">Below is code under the save setting buttons</span></strong></p>
<p style="line-height:normal;text-indent:.5in;margin:0 0 0 .5in;" class="MsoNormal"><span style="font-family:&#34;color:blue;font-size:10pt;">With</span><span style="font-family:&#34;font-size:10pt;"> <span style="color:blue;">My</span>.Settings</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.Server = <span style="color:blue;">Me</span>.txtServer.Text</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.Dbase = <span style="color:blue;">Me</span>.txtDbase.Text</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.UserName = <span style="color:blue;">Me</span>.txtUserName.Text</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.Password = <span style="color:blue;">Me</span>.txtPassWord.Text</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.integrated = <span style="color:blue;">Me</span>.ChkSecurity.Checked</span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:&#34;font-size:10pt;">.Save()</span></p>
<p class="MsoNormal"><span style="line-height:115%;font-family:&#34;font-size:10pt;"><span style="color:blue;">End</span> <span style="color:blue;">With</span></span></p>
<p><!-- technorati tags begin --></p>
<p style="text-align:right;font-size:10px;">Tags: <a href="http://technorati.com/tag/ConnectionStrings" rel="tag">ConnectionStrings</a>, <a href="http://technorati.com/tag/%20Typed%20dataset" rel="tag">Typed dataset</a>, <a href="http://technorati.com/tag/%20Settings" rel="tag">Settings</a>, <a href="http://technorati.com/tag/vb.net" rel="tag">vb.net</a>, <a href="http://technorati.com/tag/vs2005" rel="tag">vs2005</a></p>
<p><!-- technorati tags end --></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C#:Using Dictionary as DropDownList Data Source]]></title>
<link>http://malakablog.wordpress.com/2009/03/31/cusing-dictionary-as-dropdownlist-data-source/</link>
<pubDate>Tue, 31 Mar 2009 16:11:19 +0000</pubDate>
<dc:creator>malakablog</dc:creator>
<guid>http://malakablog.wordpress.com/2009/03/31/cusing-dictionary-as-dropdownlist-data-source/</guid>
<description><![CDATA[I have IDictionary Object called ListOptions. To use it as the data source for an ASP.NET DropDownLi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">I have <span style="color:teal;">IDictionary</span> Object called ListOptions. To use it as the data source for an ASP.NET DropDownList called objDropDownList:</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<div></div>
<p><span style="font-size:10pt;font-family:Verdana;"></p>
<blockquote>
<p class="MsoNormal" style="text-indent:36pt;margin:0;"><span style="font-size:10pt;font-family:Verdana;">objDropDownList.DataSource = ListOptions;</span></p>
<p class="MsoNormal" style="text-indent:36pt;margin:0;"><span style="font-size:10pt;font-family:Verdana;">objDropDownList.DataTextField = <span style="color:maroon;">&#8220;Value&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>objDropDownList.DataValueField<span>  </span>= <span style="color:maroon;">&#8220;Key&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>objDropDownList.DataBind();<span>  </span></span></p>
<p> </p>
<p></span></p></blockquote>
<p> </p>
<p></span></p>
<p class="MsoNormal" style="margin:0;"> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ "sgen.exe" exited with code 1]]></title>
<link>http://floppynet.wordpress.com/2009/03/11/sgenexe-exited-with-code-1/</link>
<pubDate>Wed, 11 Mar 2009 13:24:14 +0000</pubDate>
<dc:creator>floppynet</dc:creator>
<guid>http://floppynet.wordpress.com/2009/03/11/sgenexe-exited-with-code-1/</guid>
<description><![CDATA[Para solventar este error con vs2005 cuando ejecutamos nuestro proyecto (el cual tiene referencias a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Para solventar este error con vs2005 cuando ejecutamos nuestro proyecto (el cual tiene referencias a servicios web) seguimos los siguientes pasos:<br />
1.- Abrir propiedades del proyecto.<br />
2.- Pestaña Build<br />
3.- Poner &#8220;Generate Serialization Assembly&#8221; a &#8220;Off&#8221;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OpenFileDialog.SafeFileName]]></title>
<link>http://techblogs.wordpress.com/2009/03/10/safefilename/</link>
<pubDate>Tue, 10 Mar 2009 11:05:42 +0000</pubDate>
<dc:creator>Bilal</dc:creator>
<guid>http://techblogs.wordpress.com/2009/03/10/safefilename/</guid>
<description><![CDATA[I had developed an application in VS2008 with .NET 2.0 . The application was deployed using the VS20]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I had developed an application in VS2008 with .NET 2.0 . The application was deployed using the VS2008 deployment project  with .NET Framework as pre-req. AutoCAD 2009 was already installed on all the client machines so the pre-req conditions were satisfied so .NET Framework was not skipped during the installation of the application.</p>
<p>Later on,  I made a clean installation of WIN XP SP3 on my development machine. I skipped VS 2008 because I could not find its proper usage. VS2005 was sufficient for me.</p>
<p>Today, I got the a request for some updates in the application. For this purpose, I converted it to VS2005. On building the application is got the error about <strong>OpenFileDialog.SafeFileName</strong>. It was really a strange thing as the application was working smoothly on all the client machines.</p>
<p><strong>SafeFileName</strong> returns only the File Name from the whole path. Although, I got the problem solved by doing some string operations:<br />
<code>String safeName = opdg.FileName.Substring(opdg.FileName.LastIndexOf("\\") + 1);<br />
// 1 has been added to skip the \</code></p>
<p>I <a href="http://pavangayakwad.blogspot.com/2008/06/safefilename-property-and-net-20-sp1.html">Googled </a>about it and it was disclosed that this property is available in .NET Framework 2.0 SP1 which is installed along with VS2008.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DisplayMember and ValueMember - Properties, not fields.]]></title>
<link>http://neilmoss.wordpress.com/2009/03/08/displaymember-and-valuemember-properties-not-fields/</link>
<pubDate>Sun, 08 Mar 2009 17:25:48 +0000</pubDate>
<dc:creator>neilmoss</dc:creator>
<guid>http://neilmoss.wordpress.com/2009/03/08/displaymember-and-valuemember-properties-not-fields/</guid>
<description><![CDATA[When using ValueMember and DisplayMember with ComboBox and ListBox controls, the corresponding membe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>When using ValueMember and DisplayMember with ComboBox and ListBox controls, the corresponding members of the objects listed in your DataSource need to be public <em>properties</em>, and not public <em>fields</em>. If you do not do this, your list controls will display the ToString() equivalent, which is frequently just the objects&#8217; class name.</p>
<p>e.g.</p>
<pre style="background-color:#eeeeee;border:black 1px solid;margin:8px;">namespace Example
{
  public class ListEntry
  {
    public Guid ID;
    public string Title;
  }
}</pre>
<p>This object will display &#8220;Example.ListEntry&#8221; as its entry in a ListBox, even if the ValueMember is set to &#8220;ID&#8221; and DisplayMember is set to &#8220;Title&#8221;.</p>
<p>Yes, I know the documentation says &#8220;Gets or sets the <strong>property </strong>to display for this ListControl&#8221;. However, if you&#8217;re given a third-party object to use, you now have to be aware of how it encapsulates its data and that&#8217;s unfortunate.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[TFS Team Build: Testen von Webservices mit UnitTests auf dem Client und Team Build Server]]></title>
<link>http://peroxide20.wordpress.com/2009/02/26/tfs-team-build-testen-von-webservices-mit-unittests-auf-dem-client-und-team-build-server/</link>
<pubDate>Thu, 26 Feb 2009 09:04:20 +0000</pubDate>
<dc:creator>peroxide20</dc:creator>
<guid>http://peroxide20.wordpress.com/2009/02/26/tfs-team-build-testen-von-webservices-mit-unittests-auf-dem-client-und-team-build-server/</guid>
<description><![CDATA[Damit ein UnitTest, den wir gegen einen WebService (z.B. TOService) ausführen auch auf dem Team-Buil]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Damit ein UnitTest, den wir gegen einen WebService (z.B. TOService) ausführen auch auf dem Team-Build Server läuft sind folgende Schritte notwendig:</p>
<p><strong>1. Im UnitTest eine WebReference zum Webservice einfügen: </p>
<p><a href="http://peroxide20.files.wordpress.com/2009/02/image.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="160" alt="image" src="http://peroxide20.files.wordpress.com/2009/02/image-thumb.png?w=255&#038;h=160" width="255"/></a> </strong></p>
<p><strong>2. Im UnitTest folgendes Attribut über der UnitTest-Methode einfügen:</strong></p>
<div class="CodeFormatContainer">
<pre class="csharpcode">[AspNetDevelopmentServer("<span style="color:#8b0000;">TOServiceHost</span>",
		"<span style="color:#8b0000;">%PathToWebRoot%\\Test.TOServiceHost</span>")]
</pre>
</div>
<p><strong>3. In der UnitTest-Methode den WebServiceHelper verwenden:</strong></p>
<pre>var sc = <span style="color:#0000ff;">new</span> TOService();
WebServiceHelper.TryUrlRedirection(sc,
			TestContext,"<span style="color:#8b0000;">TOServiceHost</span>");
Assert.NotNull(sc.MyMethodForTest());
</pre>
<p><strong>4. Im Visual Studio unter “Tools” &#62; “Options” &#62; “Test Tools” &#62; “Test Execution” den Pfad eintragen:</strong></p>
<p>Es kann passieren, das auf dem Client der Ordner zum Webservice nicht richtig aufgelöst wird. Dann kann man im VS einstellen, wo der Basisordner (%PathToWebRoot%) liegen soll. Den Ordner, wo der Webservice “Test.TOServiceHost” drin liegt den ihr testen wollt entsprechend einstellen.</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/02/image1.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="160" alt="image" src="http://peroxide20.files.wordpress.com/2009/02/image-thumb1.png?w=260&#038;h=160" width="260"/></a>&#160;</p>
<p><strong>5. In der .vsmdi Datei den Test in die Liste eintragen, die im Teambuild ausgeführt wird:</strong></p>
<p>In der VSMDI Datei können dann alle UnitTests der Solution in eine Liste eingefügt werden: </p>
<p><a href="http://peroxide20.files.wordpress.com/2009/02/image2.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="84" alt="image" src="http://peroxide20.files.wordpress.com/2009/02/image-thumb2.png?w=260&#038;h=84" width="260"/></a></p>
<p>Im Teambuild File wird die Liste aus dem VSMDI File angegeben, womit alle UnitTests dieser Liste auf dem Teambuild Server ausgeführt werden:</p>
<pre><span style="color:#0000ff;">&#60;</span><span style="color:#800000;">MetaDataFile</span> <span style="color:#ff0000;">Include</span>=
   <span style="color:#0000ff;">"$(BuildProjectFolderPath)/../../Main/Source/Test/test.vsmdi"</span><span style="color:#0000ff;">&#62;</span>
   <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">TestList</span><span style="color:#0000ff;">&#62;</span>AllTests<span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">TestList</span><span style="color:#0000ff;">&#62;</span>
<span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">MetaDataFile</span><span style="color:#0000ff;">&#62;</span>
</pre>
<pre></pre>
</p>
<p>In der Liste können jetzt auch Tests aufgeführt werden, die einen WebService aus der Solution aufrufen.</p>
<p><strong>6. SolutionFile ggf. bearbeiten:</strong></p>
<p>Wichtig ist, dass der Webservice bzw. die Webapplikation mit auf dem Server compiliert wird. Das kann z.B. über die Solution Configuration “Debug” sichergestellt werden. Wenn hier ein anderer Typ eingeführt wurde (z.B. “Debug_CodeAnalysis”) kann es passieren, dass die Website auf dem Server nicht unter “_PublishedWebsites” kompiliert/abgelegt wird. Dann funktionieren die UnitTests auf dem Server wieder nicht. Es bietet sich an den Solution-Typ “Debug” und für alle gewünschten Projekte (außer Webprojekte) einen anderen Typ z.B. “Debug_CodeAnalysis” zu verwenden:</p>
<p>&#160;<a href="http://peroxide20.files.wordpress.com/2009/02/image3.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="171" alt="image" src="http://peroxide20.files.wordpress.com/2009/02/image-thumb3.png?w=260&#038;h=171" width="260"/></a></p>
<p><strong>7. Teambuild mit Codeanalysis, CodeCoverage und UnitTests:</strong></p>
<p>Jetzt sind wir schon ziemlich weit gekommen und freuen uns das endlich unser Webservice um den es im Projekt zentral geht auch über UnitTests auf dem Team Build Server jeder Zeit (z.B. jede Nacht – Continuous Integration) getestet werden kann. Verwendet man nun alle Features die zum Team Build dazu gehören, wie Code Analysis und Code Coverage, wundert man sich doch recht schnell warum die Coverage Werte sehr niedrig sind. Ein kleine Recherche in den erzeugten Dateien und Reports ergibt, dass alle UnitTests die über den WebService gelaufen sind nicht im CodeCoverage auftauchen ;(… Das ist natürlich schlecht!!! Wenn ich aber die WebService-Methoden nicht über die WebReference sondern direkt teste fehlt mir wieder der HTTP-Context in den Tests.) Was ist hier nun die beste Lösung? Mocking vom HTTPContext und wieder ohne WebReference testen?</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/02/image4.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="103" alt="image" src="http://peroxide20.files.wordpress.com/2009/02/image-thumb4.png?w=260&#038;h=103" width="260"/></a></p>
<p>WordPress Tags: <a href="http://wordpress.com/tag/Team" rel="Tag">Team</a>,<a href="http://wordpress.com/tag/Build" rel="Tag">Build</a>,<a href="http://wordpress.com/tag/Webservice" rel="Tag">Webservice</a>,<a href="http://wordpress.com/tag/UnitTests" rel="Tag">UnitTests</a>,<a href="http://wordpress.com/tag/PathToWebRoot" rel="Tag">PathToWebRoot</a>,<a href="http://wordpress.com/tag/Test" rel="Tag">Test</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to sort a collection to be used in DropDown List ]]></title>
<link>http://malakablog.wordpress.com/2009/02/18/how-to-sort-a-collection-to-be-used-in-dropdown-list/</link>
<pubDate>Wed, 18 Feb 2009 13:19:20 +0000</pubDate>
<dc:creator>malakablog</dc:creator>
<guid>http://malakablog.wordpress.com/2009/02/18/how-to-sort-a-collection-to-be-used-in-dropdown-list/</guid>
<description><![CDATA[I have a collection object (EmployeesCollection) for custom Employee class, In the Employee class th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">I have a collection object (EmployeesCollection) for custom Employee class, In the Employee class there are two properties Name and EmployeeID. I want to sort the EmployeesCollection by Name and use it in a DropDown List (ddEmployees).</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<div></div>
<p><span style="font-size:10pt;font-family:Verdana;"></p>
<blockquote>
<p class="MsoNormal" style="text-indent:36pt;margin:0;"><span style="font-size:10pt;color:teal;font-family:Verdana;">DataTable</span><span style="font-size:10pt;font-family:Verdana;"> dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;"> = <span style="color:blue;">new</span> <span style="color:teal;">DataTable</span>();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>     </span><span>     </span>dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;">.Columns.Add(<span style="color:maroon;">&#8220;Name&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span>dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;">.Columns.Add(<span style="color:maroon;">&#8220;EmployeeID&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span><span style="color:blue;">foreach</span> (<span style="color:teal;">Employee</span> v</span><span style="font-size:10pt;font-family:Verdana;">Employee</span><span style="font-size:10pt;font-family:Verdana;"> <span style="color:blue;">in</span> </span><span style="font-size:10pt;font-family:Verdana;">EmployeesCollection</span><span style="font-size:10pt;font-family:Verdana;">)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span><span>          </span>dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;">.Rows.Add(<span style="color:blue;">new</span> <span style="color:blue;">object</span>[] { v</span><span style="font-size:10pt;font-family:Verdana;">Employee</span><span style="font-size:10pt;font-family:Verdana;">.Name, v</span><span style="font-size:10pt;font-family:Verdana;">Employee</span><span style="font-size:10pt;font-family:Verdana;">.</span><span style="font-size:10pt;font-family:Verdana;"> EmployeeID</span><span style="font-size:10pt;font-family:Verdana;"><span>  </span>});</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span>dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;">.DefaultView.Sort = <span style="color:maroon;">&#8220;Name&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span></span><span style="font-size:10pt;font-family:Verdana;">ddEmployees</span><span style="font-size:10pt;font-family:Verdana;">.DataSource = dt</span><span style="font-size:10pt;font-family:Verdana;">Employees</span><span style="font-size:10pt;font-family:Verdana;">;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span></span><span style="font-size:10pt;font-family:Verdana;">ddEmployees</span><span style="font-size:10pt;font-family:Verdana;">.DataTextField = <span style="color:maroon;">&#8220;Name&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span></span><span style="font-size:10pt;font-family:Verdana;">ddEmployees</span><span style="font-size:10pt;font-family:Verdana;">.DataValueField = <span style="color:maroon;">&#8220;EmployeeID&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span></span><span style="font-size:10pt;font-family:Verdana;">ddEmployees</span><span style="font-size:10pt;font-family:Verdana;">.DataBind();</span></p>
</blockquote>
<p class="MsoNormal" style="margin:0;"> </p>
<p> </p>
<p> </p>
<p></span></p>
<p class="MsoNormal" style="margin:0;"> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Web Application Template missing in Visual Studio 2005]]></title>
<link>http://codebase101.wordpress.com/2009/02/06/web-application-template-missing-in-visual-studio-2005/</link>
<pubDate>Fri, 06 Feb 2009 03:13:11 +0000</pubDate>
<dc:creator>hp7500</dc:creator>
<guid>http://codebase101.wordpress.com/2009/02/06/web-application-template-missing-in-visual-studio-2005/</guid>
<description><![CDATA[http://forums.asp.net/p/989112/1282012.aspx http://geekswithblogs.net/ehammersley/archive/2005/11/08]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://forums.asp.net/p/989112/1282012.aspx">http://forums.asp.net/p/989112/1282012.aspx</a></p>
<p><a href="http://geekswithblogs.net/ehammersley/archive/2005/11/08/59451.aspx">http://geekswithblogs.net/ehammersley/archive/2005/11/08/59451.aspx</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[.NET - VS05/VS08 won't allow ports  [SOLVED]]]></title>
<link>http://danielsaidi.wordpress.com/2009/01/29/iis7-wont-allow-ports/</link>
<pubDate>Thu, 29 Jan 2009 09:28:10 +0000</pubDate>
<dc:creator>danielsaidi</dc:creator>
<guid>http://danielsaidi.wordpress.com/2009/01/29/iis7-wont-allow-ports/</guid>
<description><![CDATA[Problem After I made a clean install of my Vista development computer, and running VS05/VS08, I have]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>Problem</h3>
<p>After I made a clean install of my Vista development computer, and running VS05/VS08, I have a problem using dynamic ports when developing ASP.NET web applications.</p>
<p>When web applications are executed in VS05/VS08, they may run on dynamic ports on the development server, e.g. <em>localhost:12345</em>. This worked before my computer was blown clean, but now I&#8217;m just redirected to <em>www.localhost.com:12345</em>. I am not redirected IE, but the web page just won&#8217;t load, so I guess the same thing happens here although it&#8217;s not displayed to the user.</p>
<h3>Solution</h3>
<p>After some struggling, I found the solution at<br />
<a title="http://bvencel.blogspot.com/2008/05/aspnet-development-server-problems.html" href="http://bvencel.blogspot.com/2008/05/aspnet-development-server-problems.html">http://bvencel.blogspot.com/2008/05/aspnet-development-server-problems.html</a></p>
<p>It does not feel that good to go through with this change without knowing exactly what it does, but it works.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Visual Studio 2005 Keyboard Environment, missing Step Into F11]]></title>
<link>http://scmay.wordpress.com/2009/01/29/visual-studio-2005-keyboard-environment-missing-step-into-f11/</link>
<pubDate>Thu, 29 Jan 2009 03:46:00 +0000</pubDate>
<dc:creator>scmay</dc:creator>
<guid>http://scmay.wordpress.com/2009/01/29/visual-studio-2005-keyboard-environment-missing-step-into-f11/</guid>
<description><![CDATA[I&#8217;m not sure if I&#8217;m the only one, I recently used another user profile on VS2005, needle]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;m not sure if I&#8217;m the only one, I recently used another user profile on VS2005, needless to say all the environment settings were reset and I realized that my favourite Step Into button no longer exists, and the keyboard F11 no longer works. Only using Step Over F10 isn&#8217;t very favourable. </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb245788(VS.80).aspx">http://msdn.microsoft.com/en-us/library/bb245788(VS.80).aspx</a></p>
<p> </p>
<p>Anyway, this is what I did.</p>
<p>Tools &#62; Import and Export Settings</p>
<p>Import selected environment settings</p>
<p>Yes, save my current settings</p>
<p>Default Settings &#62; General Development Settings</p>
<p>(Description: Configures the environment to closely match VS .NET 2003 to provide an experience that is already familiar to you. Select this collection of settings if you develop in more than one programming language)</p>
<p> </p>
<p>Someone else has blogged about the menu settings different for C# and VB, so he adds/changes the C# environment into the menu to get the Step Into button</p>
<p><a href="http://blogs.vertigo.com/personal/keithc/Blog/archive/2007/07/20/missing-menu-options-in-visual-studio-2005.aspx">http://blogs.vertigo.com/personal/keithc/Blog/archive/2007/07/20/missing-menu-options-in-visual-studio-2005.aspx</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[UnitTests, automatische Tests mit TFS 2008]]></title>
<link>http://peroxide20.wordpress.com/2009/01/23/unittests-automatische-tests-mit-tfs-2008/</link>
<pubDate>Fri, 23 Jan 2009 07:55:57 +0000</pubDate>
<dc:creator>peroxide20</dc:creator>
<guid>http://peroxide20.wordpress.com/2009/01/23/unittests-automatische-tests-mit-tfs-2008/</guid>
<description><![CDATA[Fast immer benötigt man für das Ausführen von UnitTests eine Umgebung wie im wirklichen Leben. Es si]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Fast immer benötigt man für das Ausführen von UnitTests eine Umgebung wie im wirklichen Leben. Es sind also auch z.B. Konfigurationsfiles an einem bestimmten Ort (wie z.B. in einem Unterordner “config”) notwendig. Die Visual Studio UnitTests werden aber in einem eigenen Ordner ausgeführt und genau dort braucht man nun auch diesen Unterordner mit seinen Dateien. Hier gibt es im großen und ganzen zwei Ansätze. Entweder man konfiguriert die Testkonfiguration (siehe 2 Abbildungen):</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/01/image.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="185" alt="image" src="http://peroxide20.files.wordpress.com/2009/01/image-thumb.png?w=416&#038;h=185" width="416"/></a> <br />&#8211;&#62; öffnen der Testkonfiguration mit Wizard </p>
<p><a href="http://peroxide20.files.wordpress.com/2009/01/image1.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="146" alt="image" src="http://peroxide20.files.wordpress.com/2009/01/image-thumb1.png?w=417&#038;h=146" width="417"/></a> <br />&#8211;&#62; Definieren von Dateien die für die UnitTests notwendig sind unter “Deployment” </p>
<p>Leider bietet der Wizard keine Möglichkeit einen Unterordner/Zielordner mit anzugeben. Dazu muss man das “.testconfig” File im XML-Editor öffnen und selbst am DeploymentItem-Tag herumeditieren. Dort steht einem nun das Attribut “outputDirectory” zur Verfügung.</p>
<table cellspacing="0" cellpadding="2" width="441" border="1">
<tbody>
<tr>
<td valign="top" width="439">
<pre><span style="color:#0000ff;">&#60;</span><span style="color:#800000;">Deployment</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">DeploymentItem</span> <span style="color:#ff0000;">filename</span>=<span style="color:#0000ff;">"log4net.conf.xml"</span>
    <span style="color:#ff0000;">outputDirectory</span>=<span style="color:#0000ff;">"config"</span> <span style="color:#0000ff;">/&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">DeploymentItem</span> <span style="color:#ff0000;">filename</span>=<span style="color:#0000ff;">"myentlib.config"</span> <span style="color:#0000ff;">/&#62;</span>
<span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">Deployment&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p>&#8211;&#62; .testconfig File im XML-Editor</p>
<p>Der zweite Ansatz ist über ein Attribut im Testcode selbst zu definieren welche Dateien für den Test notwendig sind:</p>
<p>DeploymentItems (<a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.deploymentitemattribute(VS.80).aspx" target="_blank">DeploymentItemsAttribute bei MSDN</a>)</p>
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="400">
<div style="font-size:10pt;background:white;color:black;font-family:courier new;">
<pre>[TestMethod()]
[DeploymentItem("<span style="color:#8b0000;">config\\log4net.conf.xml</span>", "<span style="color:#8b0000;">config</span>")]
<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> MyTest()
{
    ...
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
<p>&#8211;&#62; DeploymentItemAttribut im Code</p>
<h5>DeploymentItems und TFS Team Build:</h5>
<p>Leider hat man nun das nächste Problem mit den DeploymentItems und UnitTests im Zusammenhang mit Teambuild. Auf dem Teambuild Server können die UnitTests nur ausgeführt werden, wenn Visual Studio installiert ist. Das VS2008 hat hier wohl einen Bug, denn er sucht die für den UnitTest definierten DeploymentItems nicht im Ordner wo die Tests ausgeführt werden, sondern im Ordner wo Visual Studio auf dem Teambuild Server installiert ist (<em>System.Configuration.ConfigurationErrorsException: The configuration folder &#8216;D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\config\log4net.conf.xml&#8217; doesn&#8217;t exist</em>).</p>
<p>Geholfen hat jetzt nur ein Workaround im Testcode:</p>
<table cellspacing="0" cellpadding="2" width="439" border="1">
<tbody>
<tr>
<td valign="top" width="437">
<div style="font-size:10pt;background:white;color:black;font-family:courier new;">
<pre>[ClassInitialize()]
<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> MyClassInitialize(
  TestContext testContext)
{
    AppDomain.CurrentDomain.SetData("<span style="color:#8b0000;">APPBASE</span>",
     Environment.CurrentDirectory);
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
<p>&#8211;&#62; Bei jedem UnitTest in der Initialisierung einzufügen (<a href="http://social.msdn.microsoft.com/forums/en-US/vststest/thread/f5cb58f4-a35d-41f8-900a-3bc69637afc9/" target="_blank">Forum post hier</a>)</p>
<h5>Team Build – Code Coverage – Partially Succeeded</h5>
<p>Manchmal kommt es trotz erfolgreichen Build und auch erfolgreichen durchführen aller UnitTests zu dem Status “Partially Succeeded”.</p>
<p><a href="http://peroxide20.files.wordpress.com/2009/01/image2.png" target="_blank"><img title="image" style="display:inline;border-width:0;" height="165" alt="image" src="http://peroxide20.files.wordpress.com/2009/01/image-thumb2.png?w=424&#038;h=165" width="424"/></a></p>
<p>&#8211;&#62; “Partially Succeeded” trotz erfolgreichem Build und no failed UnitTests ?!</p>
<p>Ein bisschen Nachforschung bringt einen dann auf den Pfad, dass es ein paar Warnungen gegeben hat, die man auch Abarbeiten kann. Man lädt sich die Testresults auf den lokalen Rechner (Link unter “Test Run” anklicken) und arbeitet die Warnungen ab. Zum Beispiel will Code Coverage zwingend x86 dlls (siehe auch <a href="http://social.msdn.microsoft.com/Forums/en-US/vstsprofiler/thread/abf4ae19-114f-492a-9191-28df94a6be1f/" target="_blank">hier</a>). Weiterhin müssen alle dlls die im Code Coverage eingeschlossen sind auch verfügbar sein. Code Coverage wird übrigens auch in der .testconfig Datei definiert und kann mit dem Wizard (siehe oben im Artikel) eingerichtet werden.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Using PageMethods/WebMethods to update Sessions variable]]></title>
<link>http://otherworldofmine.wordpress.com/2009/01/13/using-pagemethodswebmethods-to-update-sessions-variable/</link>
<pubDate>Tue, 13 Jan 2009 21:01:39 +0000</pubDate>
<dc:creator>otherworldofmine</dc:creator>
<guid>http://otherworldofmine.wordpress.com/2009/01/13/using-pagemethodswebmethods-to-update-sessions-variable/</guid>
<description><![CDATA[HTML     &lt;%@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221; CodeFile=&#8221;De]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>HTML</p>
<p> </p>
<p> </p>
<p><strong>&#60;%@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221; CodeFile=&#8221;Default.aspx.cs&#8221; Inherits=&#8221;Default&#8221; %&#62;</strong></p>
<p><strong>&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;</strong></p>
<p><strong><br />
</strong></p>
<p><strong>&#60;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; &#62;</strong></p>
<p><strong>&#60;head id=&#8221;Head1&#8243; runat=&#8221;server&#8221;&#62;</strong></p>
<p><strong>    &#60;title&#62;Untitled Page&#60;/title&#62;</strong></p>
<p><strong>   &#60;script type=&#8221;text/javascript&#8221; language=&#8221;javascript&#8221; src=&#8221;Script.js&#8221;&#62; &#60;/script&#62;</strong></p>
<p><strong>&#60;/head&#62;</strong></p>
<p><strong>&#60;body&#62;</strong></p>
<p><strong>    &#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62;</strong></p>
<p><strong>    &#60;asp:ScriptManager ID=&#8221;ScriptManager1&#8243; runat=&#8221;server&#8221; EnablePageMethods=&#8221;True&#8221;&#62;</strong></p>
<p><strong>&#60;/asp:ScriptManager&#62;</strong></p>
<p><strong>   &#60;div&#62;</strong></p>
<p><strong>        &#60;asp:Label ID=&#8221;lblCustId1&#8243; runat=&#8221;server&#8221; Text=&#8221;Customer ID 1&#8243;&#62;&#60;/asp:Label&#62;</strong></p>
<p><strong>        &#60;asp:TextBox ID=&#8221;txtId1&#8243; runat=&#8221;server&#8221;&#62;&#60;/asp:TextBox&#62;&#60;br /&#62;</strong></p>
<p><strong>            &#60;asp:TextBox ID=&#8221;txtContact1&#8243; runat=&#8221;server&#8221; BorderColor=&#8221;Transparent&#8221; BorderStyle=&#8221;None&#8221;</strong></p>
<p><strong>                ReadOnly=&#8221;True&#8221;&#62;&#60;/asp:TextBox&#62;&#60;br /&#62;</strong></p>
<p><strong>        &#60;br /&#62;</strong></p>
<p><strong>        &#60;asp:Label ID=&#8221;lblCustId2&#8243; runat=&#8221;server&#8221; Text=&#8221;Customer ID 2&#8243;&#62;&#60;/asp:Label&#62;</strong></p>
<p><strong>        &#38;nbsp;</strong></p>
<p><strong>        &#60;asp:TextBox ID=&#8221;txtId2&#8243; runat=&#8221;server&#8221;&#62;&#60;/asp:TextBox&#62;&#60;br /&#62;</strong></p>
<p><strong>            &#60;asp:TextBox ID=&#8221;txtContact2&#8243; runat=&#8221;server&#8221; BorderColor=&#8221;Transparent&#8221; BorderStyle=&#8221;None&#8221;</strong></p>
<p><strong>                ReadOnly=&#8221;True&#8221;&#62;&#60;/asp:TextBox&#62;&#38;nbsp;&#60;br /&#62;</strong></p>
<p><strong>            &#60;/div&#62;</strong></p>
<p><strong>    &#60;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; onclick=&#8221;Button1_Click&#8221; Text=&#8221;Button&#8221; /&#62;</strong></p>
<p><strong>    &#60;/form&#62;</strong></p>
<p><strong>&#60;/body&#62;</strong></p>
<p><strong>&#60;/html&#62;</strong></p>
<p> </p>
<p> </p>
<p><strong>Code Behind:</strong></p>
<p> </p>
<p><strong></strong></p>
<p>using System;</p>
<p>using System.Configuration;</p>
<p>using System.Data;</p>
<p>using System.Linq;</p>
<p>using System.Web;</p>
<p>using System.Web.Security;</p>
<p>using System.Web.UI;</p>
<p>using System.Web.UI.HtmlControls;</p>
<p>using System.Web.UI.WebControls;</p>
<p>using System.Web.UI.WebControls.WebParts;</p>
<p>using System.Xml.Linq;</p>
<p> </p>
<p> </p>
<p>public partial class Default : System.Web.UI.Page </p>
<p>{</p>
<p>    protected void Page_Load(object sender, EventArgs e)</p>
<p>    {</p>
<p> </p>
<p>        if (!Page.IsPostBack)</p>
<p>        {</p>
<p>            txtId1.Attributes.Add(&#8220;onblur&#8221;, &#8220;javascript:CallMe(&#8216;&#8221; + txtId1.ClientID + &#8220;&#8216;, &#8216;&#8221; + txtContact1.ClientID + &#8220;&#8216;)&#8221;);</p>
<p>            txtId2.Attributes.Add(&#8220;onblur&#8221;, &#8220;javascript:CallMe(&#8216;&#8221; + txtId2.ClientID + &#8220;&#8216;, &#8216;&#8221; + txtContact2.ClientID + &#8220;&#8216;)&#8221;);</p>
<p> </p>
<p>        }</p>
<p>    }</p>
<p> </p>
<p>    [System.Web.Services.WebMethod(EnableSession = true)]</p>
<p>    public static void  GetContactName(string custid)</p>
<p>    {</p>
<p> </p>
<p>            HttpContext.Current.Session["Testing"] = custid;</p>
<p> </p>
<p> </p>
<p>    }</p>
<p> </p>
<p> </p>
<p> </p>
<p>    protected void Button1_Click(object sender, EventArgs e)</p>
<p>    {</p>
<p>        Response.Redirect(&#8220;DEfault2.aspx&#8221;);</p>
<p>    }</p>
<p>}</p>
<div></div>
<div></div>
<div>JavaScript:</div>
<div></div>
<div>
<div>function CallMe(src, dest) {</div>
<div>    var ctrl = document.getElementById(src);</div>
<div>    // call server side method    </div>
<div>    PageMethods.GetContactName(ctrl.value, CallSuccess, CallFailed, dest);    </div>
<div>}</div>
<div></div>
<div>// set the destination textbox value with the ContactName</div>
<div>function CallSuccess(res, destCtrl) {</div>
<div>    var dest = document.getElementById(destCtrl);</div>
<div>    dest.value = res;</div>
<div>}</div>
<div></div>
<div>// alert message on some failure</div>
<div>function CallFailed(res, destCtrl) {</div>
<div>    alert(res.get_message());</div>
<div>}</div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div><em><span style="font-weight:normal;">Second Page To test the session variable</p>
<p>HTML:</p>
<p>&#60;%@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221; CodeFile=&#8221;Default2.aspx.cs&#8221; Inherits=&#8221;Default2&#8243; %&#62;</p>
<p>&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;</p>
<p>&#60;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&#62;<br />
&#60;head runat=&#8221;server&#8221;&#62;<br />
    &#60;title&#62;Untitled Page&#60;/title&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;<br />
    &#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62;<br />
    &#60;div&#62;<br />
    <br />
    &#60;/div&#62;<br />
    &#60;asp:Label ID=&#8221;Label1&#8243; runat=&#8221;server&#8221; Text=&#8221;Label&#8221;&#62;&#60;/asp:Label&#62;<br />
    &#60;/form&#62;<br />
&#60;/body&#62;<br />
&#60;/html&#62;</p>
<p>Code Behind</p>
<p>using System;<br />
using System.Collections;<br />
using System.Configuration;<br />
using System.Data;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Xml.Linq;</p>
<p>public partial class Default2 : System.Web.UI.Page<br />
{<br />
    protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
        Label1.Text = Session["Testing"].ToString();<br />
    }<br />
}</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Visual Studio Incremental Search (Type-Ahead Find)]]></title>
<link>http://blog.wolffmyren.com/2008/12/10/visual-studio-incremental-search-type-ahead-find/</link>
<pubDate>Wed, 10 Dec 2008 20:48:38 +0000</pubDate>
<dc:creator>willwm</dc:creator>
<guid>http://blog.wolffmyren.com/2008/12/10/visual-studio-incremental-search-type-ahead-find/</guid>
<description><![CDATA[This is just awesome &#8211; with Ctrl+I, you can perform a type-ahead search within Visual Studio, ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is just awesome &#8211; with Ctrl+I, you can perform a type-ahead search within Visual Studio, just like Firefox!</p>
<blockquote><p>Again, my buddy Sairama to the rescue.  Just when I think I&#8217;ve pretty much got VS.NET down solid (only being use it since Pre-Beta days, right?) I&#8217;m thrown a curve ball called incremental search.  I guess I just assumed that a feature that was so cool in so many other editors would never make it into VS.NET. Silly me.</p>
<p>So, lest I be the most ignorant, fire up Visual Studio.NET, get some code in there, hit Ctrl-I and start typing.  After you&#8217;ve found something, use F3 to Find Next.  In the words of Chris Sells &#8211; It&#8217;s pure sex.</p></blockquote>
<p>via <a href="http://www.hanselman.com/blog/MyIgnoranceProceedsMeVisualStudioNETIncrementalSearch.aspx">Scott Hanselman&#8217;s Computer Zen &#8211; My ignorance proceeds me: Visual Studio.NET Incremental Search</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Firefox 2.0 – InnerHTML issue]]></title>
<link>http://malakablog.wordpress.com/2008/12/04/firefox-20-%e2%80%93-innerhtml-issue/</link>
<pubDate>Thu, 04 Dec 2008 09:37:47 +0000</pubDate>
<dc:creator>malakablog</dc:creator>
<guid>http://malakablog.wordpress.com/2008/12/04/firefox-20-%e2%80%93-innerhtml-issue/</guid>
<description><![CDATA[Sorry about the long time between posts. Hope to start posting again soon   Anyhow,   I was working ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">Sorry about the long time between posts. Hope to start posting again soon</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">Anyhow,</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">I was working on a web application that is updating the details of a &#60;map&#62; HTML element using the innerHTML, the new innerHTML value is being processed in the server side using AJAX function</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">I was using the following JavaScript function to do that</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">function</span><span style="font-size:10pt;font-family:Verdana;"> jvUpdateImageMap(ImageMapHTML)<span>  </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>    </span><span style="color:blue;">try</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>document.getElementById(<span style="color:maroon;">&#8220;MyImageMap&#8221;</span>).innerHTML= ImageMapHTML;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>         </span><span>  </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>     </span>}</span></p>
<p class="MsoNormal" style="text-indent:36pt;margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">catch</span><span style="font-size:10pt;font-family:Verdana;">(err)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>      </span><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span style="color:blue;">finally</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">}</span></p>
</blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">That was working fine for all the browser including Firefox 3.0 but not for Firefox 2.0 </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">After debugging this I found that for FireFox 3.0 the result of updating the InnerHTML is this </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>  </span></span><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;font-family:Verdana;"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;MyImageMap&#8221;</span> <span style="color:blue;">&#62;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span style="color:blue;">&#60;</span><span style="color:maroon;">area</span> <span style="color:red;">SHAPE</span><span style="color:blue;">=&#8221;rect&#8221;</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;0_30&#8243;</span> <span style="color:red;">usemap</span><span style="color:blue;">=&#8221;MyImageMap&#8221;</span> <span style="color:red;">Border</span><span style="color:blue;">=&#8221;0&#8243;</span> <span style="color:red;">href</span><span style="color:blue;">=&#8221;#&#8221;</span> <span style="color:red;">COORDS</span><span style="color:blue;">=&#8221;538,420,550,408&#8243;</span> <span style="color:blue;">/&#62;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span> </span></span><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;/</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;color:blue;font-family:Verdana;">&#62;</span></p>
</blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">This is the correct expected result</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">But for FIreFox 2.0 the result was this</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;font-family:Verdana;"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;MyImageMap&#8221;</span> <span style="color:blue;">&#62;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;font-family:Verdana;"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;MyImageMap&#8221;</span> <span style="color:blue;">&#62;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span style="color:blue;">&#60;</span><span style="color:maroon;">area</span> <span style="color:red;">SHAPE</span><span style="color:blue;">=&#8221;rect&#8221;</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;0_30&#8243;</span> <span style="color:red;">usemap</span><span style="color:blue;">=&#8221;MyImageMap&#8221;</span> <span style="color:red;">Border</span><span style="color:blue;">=&#8221;0&#8243;</span> <span style="color:red;">href</span><span style="color:blue;">=&#8221;#&#8221;</span> <span style="color:red;">COORDS</span><span style="color:blue;">=&#8221;538,420,550,408&#8243;</span> <span style="color:blue;">/&#62;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;/</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;color:blue;font-family:Verdana;">&#62;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">&#60;/</span><span style="font-size:10pt;color:maroon;font-family:Verdana;">map</span><span style="font-size:10pt;color:blue;font-family:Verdana;">&#62;</span></p>
</blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">So to fix this I had to add those lines to the server side function that generate the new &#60;map&#62; HTML code</span><span style="font-size:10pt;font-family:Verdana;"> </span><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">If</span><span style="font-size:10pt;font-family:Verdana;"> Context.Request.Browser.Browser = <span style="color:maroon;">&#8220;Firefox&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>       </span><span style="color:blue;">If</span> Context.Request.Browser.MajorVersion = <span style="color:maroon;">&#8220;2&#8243;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>    </span><span>           </span>ImageMapHTML = ImageMapHTML.Replace(<span style="color:maroon;">&#8220;&#60;map id=&#8221;"MyImageMap&#8221;" &#62;&#8221;</span>, <span style="color:maroon;">&#8220;&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>                </span>ImageMapHTML = ImageMapHTML.Replace(<span style="color:maroon;">&#8220;&#60;/map&#62;&#8221;</span>, <span style="color:maroon;">&#8220;&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"><span>        </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">End</span><span style="font-size:10pt;font-family:Verdana;"> <span style="color:blue;">If</span></span></p>
</blockquote>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
