<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blafasel bloggt &#187; C#</title>
	<atom:link href="http://www.martin-fredrich.de/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.martin-fredrich.de</link>
	<description>Wo die Macht geistlos ist, ist der Geist machtlos</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:54:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Visual Studio 2008: A selected drive is no longer valid</title>
		<link>http://www.martin-fredrich.de/2011/05/visual-studio-2008-selected-drive-longer-valid/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-2008-selected-drive-longer-valid</link>
		<comments>http://www.martin-fredrich.de/2011/05/visual-studio-2008-selected-drive-longer-valid/#comments</comments>
		<pubDate>Wed, 25 May 2011 09:40:12 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Vermischtes]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tipps + Tricks]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=1157</guid>
		<description><![CDATA[Vor einiger Zeit habe ich ein neues Notebook bekommen. Unsere Admins haben die für mich notwendige Software darauf installiert, jedoch beim Visual Studio 2008 kein Crystal Reports. Für eines meiner Projekte, benötige ich jedoch die Unterstützung für Crystal. Da wir &#8230; <a href="http://www.martin-fredrich.de/2011/05/visual-studio-2008-selected-drive-longer-valid/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="is" style="width:343px; height:144px;"><img class="alignleft size-full wp-image-1158" title="vs2008" src="http://www.martin-fredrich.de/wp-content/plugins/image-shadow/cache/ed4dcd52b1e3be8470e799768657adf3.jpg" alt="" width="333" height="134" /></div>
<p>Vor einiger Zeit habe ich ein neues Notebook bekommen. Unsere Admins haben die für mich notwendige Software darauf installiert, jedoch beim Visual Studio 2008 kein Crystal Reports. Für eines meiner Projekte, benötige ich jedoch die Unterstützung für Crystal. Da wir Zugriff auf die Installationsdateien haben, habe ich mir gedacht „kein Problem, installierst Du das mal eben nach…“.</p>
<p>Wie in den meisten Fällen, die „mal eben“ im Satz haben, stößt man auf Probleme. Der Aufruf des Wartungsmodus für das Visual Studio klappt, Komponenten abwählen oder hinzufügen klappt auch, bloß wenn ich dann auf weiter klicke, bekomme ich die ominöse Fehlermeldung</p>
<blockquote><p><em>A selected drive is no longer valid. Please review your installation path settings before continuing with setup.</em></p></blockquote>
<p>Nach einigem hin und her und der intensiven Suche bei Google, habe ich <a href="http://social.msdn.microsoft.com/Forums/en/vssetup/thread/2f3d0378-3175-49ae-acb7-012594a1bf3c" target="_blank">hier</a> die Lösung gefunden.</p>
<p>Und zwar liegt das Problem am Service Pack 1. Nach der Deinstallation des SP1 für Visual Studio konnte die Nachinstallation durchgeführt werden. Im Anschluss muss das SP1 natürlich erneut installiert werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2011/05/visual-studio-2008-selected-drive-longer-valid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>App_Offline.htm und &#8220;IE Friendly Error&#8221;</title>
		<link>http://www.martin-fredrich.de/2010/06/app_offline-htm-und-ie-friendly-error/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app_offline-htm-und-ie-friendly-error</link>
		<comments>http://www.martin-fredrich.de/2010/06/app_offline-htm-und-ie-friendly-error/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 13:35:24 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=1009</guid>
		<description><![CDATA[Seit ASP 2.0 gibt es ein Feature um eine Webseite in den Wartungsmodus zu bringen. Und zwar die &#8220;App_Offline.htm&#8221;, die einen super bequemen Weg ermöglicht, eine ASP.NET-Anwendung in den Wartungsmodus zu schalten, während man Änderungen  macht und  wo sichergestellt sein &#8230; <a href="http://www.martin-fredrich.de/2010/06/app_offline-htm-und-ie-friendly-error/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="is" style="width:149px;height:99px;"><a href="http://www.martin-fredrich.de/wp-content/uploads/2010/06/dotnet.jpg"><img class="alignleft size-full wp-image-1011" title="dotnet" src="http://www.martin-fredrich.de/wp-content/plugins/image-shadow/cache/480ff4af57baa78e201a9efa0629122d.jpg" alt="" width="139" height="89" /></a></div>
<p>Seit ASP 2.0 gibt es ein Feature um eine Webseite in den Wartungsmodus zu bringen. Und zwar die &#8220;App_Offline.htm&#8221;, die einen super bequemen Weg ermöglicht, eine ASP.NET-Anwendung in den Wartungsmodus zu schalten, während man Änderungen  macht und  wo sichergestellt sein muss, dass kein Benutzer Zugriff auf die Anwendung hat, bis alle Arbeiten erledigt sind.</p>
<p>Die app_offline.htm funktioniert auf eine ganz einfache Art und Weise. Die Datei wird in den Root der Anwendung gelegt und wenn der Interpreter die Datei sieht, führt er einen shut-down der Anwendung durch. Es wird jedoch kein Neustart gemacht du die Anwendung steht weiterhin für Anfragen zur Verfügung. Stattdessen wird der Inhalt der app_offline.htm an den requester gesendet. Wenn die Arbeiten an der Website beendet sind, kann man die Datei einfach löschen oder umbenennen und die Anwendung ist wieder online.</p>
<p>Auf eine Sache sei jedoch hingewiesen, die man im Auge zu behalten sollte: Ein Feature vom IE ab Version 5 sind die sogenannten  &#8221;Show Friendly Http Errors&#8221;. Dies kann unter Extras-&gt; Internetoptionen-&gt; Registerkarte &#8220;Erweitert&#8221; im IE konfiguriert werden und ist standardmäßig aktiviert. Wenn diese Option im Browser aktiviert ist, und ein Server gibt eine Seite mit weniger als Inhalt als 512 Byte zurück, dann wird im Browser nur die generische Fehlerseite angezeigt und nicht unsere Wartungsseite. Was daran jetzt freundlich sein soll verstehe ich nicht, aber sei’s drum.</p>
<p>Wir müssen also sicherstellen, dass der Inhalt unserer Wartungsseite mehr Inhalt als 512 Byte hat. Das geht zum Beispiel so:<br />
<code><br />
&lt;! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;title&gt; Wartungsarbeiten &lt;/ title&gt;<br />
&lt;/ Head&gt;</code></p>
<p>&lt;body&gt;</p>
<p>&lt;h1&gt; Wir führen zur Zeit Wartungsarbeiten durch und bitten um Ihr Verständnis…&lt;/ h1&gt;<br />
&lt;h2&gt; Bitte versuchen Sie es später erneut&lt;/ h2&gt;</p>
<p>&lt;!- -</p>
<p>Jetzt zusätzlichen Inhalt versteckt hinzufügen, so dass der IE Friendly Error verhindert wird</p>
<p>&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&lt;h2&gt; Ich bin ein sinnloser Kommentar &#8230;&lt;/ h2&gt;<br />
&#8211;&gt;<br />
&lt;/ Body&gt;<br />
&lt;/ Html&gt;</p>
<p>Ja &#8211; es sieht ein wenig seltsam aus, aber es funktioniert. <img src='http://www.martin-fredrich.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2010/06/app_offline-htm-und-ie-friendly-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script controls may not be registered before PreRender</title>
		<link>http://www.martin-fredrich.de/2009/03/script-controls-may-not-be-registered-before-prerender/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=script-controls-may-not-be-registered-before-prerender</link>
		<comments>http://www.martin-fredrich.de/2009/03/script-controls-may-not-be-registered-before-prerender/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 12:52:04 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=604</guid>
		<description><![CDATA[Braindump: Wenn beim Aufruf einer ASP.NET-Seite die Fehlermeldung &#8220;Script controls may not be registered before PreRender&#8221; erscheint, dann sollte man schauen, ob sich in der OnPreRender-Methode ein base.OnPreRender(EventArgs e) befindet. protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); // ... } &#8230; <a href="http://www.martin-fredrich.de/2009/03/script-controls-may-not-be-registered-before-prerender/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Braindump: Wenn beim Aufruf einer ASP.NET-Seite die Fehlermeldung &#8220;<em>Script controls may not be registered before PreRender</em>&#8221; erscheint, dann sollte man schauen, ob sich in der OnPreRender-Methode ein</p>
<pre>base.OnPreRender(EventArgs e)</pre>
<p>befindet.</p>
<pre>
<span style="color: #0000ff;">protected override void</span> OnPreRender(<span style="color: #33cccc;">EventArgs</span> e)
{
<span style="color: #0000ff;"> base</span>.OnPreRender(e);
<span style="color: #339966;"> // ...</span>
}</pre>
<p>Ich hoffe, dass ich mit diesem Hinweis dem ein oder anderen Zeit beim debuggen erspare.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2009/03/script-controls-may-not-be-registered-before-prerender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Festlegen eines default-Button in ASP.NET</title>
		<link>http://www.martin-fredrich.de/2009/01/festlegen-eines-default-button-in-aspnet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=festlegen-eines-default-button-in-aspnet</link>
		<comments>http://www.martin-fredrich.de/2009/01/festlegen-eines-default-button-in-aspnet/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 16:15:43 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/2009/01/festlegen-eines-default-button-in-aspnet/</guid>
		<description><![CDATA[Das drücken der Enter-Taste in einem WebForm kann manchmal einige unerwünschte Auswirkungen haben. Wenn man zum Beispiel einen Suchbegriff in eine dafür vorgesehene Textbox eingegeben hat und Enter drückt, kann es passieren, dass man sich ungewollt aus der Anwendung ausloggt &#8230; <a href="http://www.martin-fredrich.de/2009/01/festlegen-eines-default-button-in-aspnet/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Das drücken der Enter-Taste in einem WebForm kann manchmal einige unerwünschte Auswirkungen haben. Wenn man zum Beispiel einen Suchbegriff in eine dafür vorgesehene Textbox eingegeben hat und Enter drückt, kann es passieren, dass man sich ungewollt aus der Anwendung ausloggt oder irgendein anderer Button das „Klick-Event“ bekommt.</p>
<p>Es gibt aber eine Methode die es ermöglicht, dass ein Standard-Button für eine Textbox festgelegt wird, die dann angesprochen wird, wenn der Benutzer nach der Eingabe in ein Textfeld die Enter-Taste drückt.</p>
<p>Wenn eine Taste auf der Tastatur gedrückt wird, wird der JavaScript OnKeyPress-Event gefeuert. In der folgenden Methode bekommt die Textbox eine Referenz auf die Schaltfläche und simuliert so einen Mausklick auf den Button.</p>
<p>Natürlich, wie sollte es auch anders sein, haben der IE und Firefox unterschiedliche Modelle um diese Ereignisse abzufangen. Das heißt, dass die unterschiedlichen Verhaltensweisen erst einmal abfragen müssen.<br />
<code><br />
var evt = e ? e : window.event;<br />
</code></p>
<p>Die Methode gibt &#8220;false&#8221; zurück damit der KeyPress-Event abgeprochen wird, da sonst das Submit zweimal ausgeführt werden würde.<br />
<span style="font-size: 8pt; color: blue; font-family: 'Courier New'">function</span><span style="font-size: 8pt; font-family: 'Courier New'"> ButtonClick(e, buttonID){ </span></p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>      </span><span style="color: blue">var</span> evt = e ? e : window.<span style="color: blue">event</span>;</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>      </span><span style="color: blue">var</span> bt = document.getElementById(buttonID);</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>      </span><span style="color: blue">if</span> (bt){</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>          </span><span style="color: blue">if</span> (evt.keyCode == 13){</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>                </span>bt.click();</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>                </span><span style="color: blue">return</span> <span style="color: blue">false</span>;</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>          </span>}</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span>      </span>}</p>
<p class="MsoNormal" style="border: medium none ; margin: 0in 0in 0pt; padding: 0in"><span style="font-size: 8pt; font-family: 'Courier New'">}</span><br />
Im code behind müssen dann Attribute für die Textbox gesetzt werden:<br />
<code><br />
TextBox1.Attributes.Add("onkeypress", "return clickButton(event,'" + Button1.ClientID + "')");<br />
</code><code></code></p>
<p>Damit wird dann der klick auf Button1 simuliert, wenn die Enter-Taste gedrückt wird während der Focus auf der Textbox liegt .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2009/01/festlegen-eines-default-button-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML-Tags aus einem String entfernen</title>
		<link>http://www.martin-fredrich.de/2008/09/html-tags-aus-einem-string-entfernen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html-tags-aus-einem-string-entfernen</link>
		<comments>http://www.martin-fredrich.de/2008/09/html-tags-aus-einem-string-entfernen/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 16:26:34 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Codeschnipsel]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/2008/09/html-tags-aus-einem-string-entfernen/</guid>
		<description><![CDATA[Weil ich es immer wieder brauche und nicht jedes mal wieder neu nachgucken will: HTML-Tags mit Regulären Ausdrücken aus einem String entfernen. Ganz einfach, aber ich kann es mir einfach nicht merken: &#160;&#160;&#160; &#160;&#160;&#160; private static string EleminateHtml(string pString) &#160;&#160;&#160; &#8230; <a href="http://www.martin-fredrich.de/2008/09/html-tags-aus-einem-string-entfernen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Weil ich es immer wieder brauche und nicht jedes mal wieder neu nachgucken will:</p>
<p>HTML-Tags mit Regulären Ausdrücken aus einem String entfernen. Ganz einfach, aber ich kann es mir einfach nicht merken:</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt;">
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> EleminateHtml(<span style="color: blue;">string</span> pString)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">string</span> newString = <span style="color: blue;">string</span>.Empty;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">//Tags entfernen</span></p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Regex textreplace = <span style="color: blue;">new</span> Regex(&#8220;(&lt;[^&gt;]*&gt;)&#8221;);</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; newString = textreplace.Replace(pString, &#8220;&#8221;);</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> newString;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; </p>
</div>
<p>Irgendwann werde ich mir eine Assembly bauen, wo alle diese kleinen Helferlein drin sind…</p>
<p>Die Bedeutung der RegEx-Symbole kann <a href="http://www.martin-fredrich.de/regulaere-ausdruecke-in-csharp/">hier</a> nachgelesen werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2008/09/html-tags-aus-einem-string-entfernen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Strings vergleichen und Unterschiede visuell darstellen</title>
		<link>http://www.martin-fredrich.de/2008/09/strings-vergleichen-und-unterschiede-visuell-darstellen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=strings-vergleichen-und-unterschiede-visuell-darstellen</link>
		<comments>http://www.martin-fredrich.de/2008/09/strings-vergleichen-und-unterschiede-visuell-darstellen/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:57:14 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/2008/04/strings-vergleichen-und-unterschiede-visuell-darstellen/</guid>
		<description><![CDATA[Ich musste f&#252;r ein ASP.NET-Projekt die Unterschiede von zwei Texten visuell darstellen, &#228;hnlich wie bekannte Diff-Tools (Araxis Merge, WinDiff etc.) dies tun. Blo&#223; wie vorgehen? Ich habe mich dazu entschlossen, die Strings jeweils Wortweise in ein Array zu splitten und &#8230; <a href="http://www.martin-fredrich.de/2008/09/strings-vergleichen-und-unterschiede-visuell-darstellen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ich musste f&uuml;r ein ASP.NET-Projekt die Unterschiede von zwei  Texten visuell darstellen, &auml;hnlich wie bekannte Diff-Tools (<a href="http://www.araxis.com/merge/index.html">Araxis Merge</a>, WinDiff etc.) dies tun.</p>
<p>Blo&szlig; wie vorgehen? Ich habe mich dazu entschlossen, die  Strings jeweils Wortweise in ein Array zu splitten und dann die Inhalte der  Arrays zu vergleichen. Wenn ein Wort nicht passt, dann wird dieses mit einem  HTML-Tag &lt;b&gt;match&lt;/b&gt; versehen und nachdem die Arrays durchlaufen  sind, wird die ge&auml;nderte Zeichenfolge zur&uuml;ckgeliefert.</p>
<p>Der Ablauf im einzelnen:</p>
<ul>
<li>Strings einlesen</li>
<li>in ein String-Array einlesen</li>
<li>Da die Arrays unterschiedlich dimensioniert sein k&ouml;nnen, ein Rezise durchf&uuml;hren</li>
<li>Helfer-Methode aufrufen um NULL-Werte innerhalb eines Arrays zu verhindern und mit Leer-Strings ersetzen</li>
<li>Schleife durchlaufen und Unterscheidungen mit &lt;b&gt;Wort&lt;/b&gt; versehen.</li>
<li>String zur&uuml;ckgeben</li>
</ul>
<p><!--StartFragment--></p>
<div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 6pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> Compares two strings and return a new string with </span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> HTML-Tags that marks the changes.</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;/summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;strTextOld&#8221;&gt;</span><span style="COLOR: green">Originalstring</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;strTextNew&#8221;&gt;</span><span style="COLOR: green">Geänderter String</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;returns&gt;</span><span style="COLOR: green">String</span><span style="COLOR: gray">&lt;/returns&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">public</span> <span style="COLOR: blue">static</span> <span style="COLOR: blue">string</span> CompareWithHtml(<span style="COLOR: blue">string</span> strTextOld, <span style="COLOR: blue">string</span> strTextNew)</p>
<p style="MARGIN: 0px">{</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">return</span> (CompareWithHtml(strTextOld, strTextNew, <span style="COLOR: blue">false</span>));</p>
<p style="MARGIN: 0px">}</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> Compares two strings and return a new string </span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> with HTML-Tags that marks the changes.</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;/summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;strTextOld&#8221;&gt;</span><span style="COLOR: green">Originalstring</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;strTextNew&#8221;&gt;</span><span style="COLOR: green">Geänderter String</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;ignoreHTML&#8221;&gt;</span><span style="COLOR: green">Wenn </span><span style="COLOR: gray">&lt;c&gt;</span><span style="COLOR: green">true</span><span style="COLOR: gray">&lt;/c&gt;</span><span style="COLOR: green"> werden HTML-Tags ignoriert.</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;returns&gt;</span><span style="COLOR: green">String</span><span style="COLOR: gray">&lt;/returns&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">public</span> <span style="COLOR: blue">static</span> <span style="COLOR: blue">string</span> CompareWithHtml(<span style="COLOR: blue">string</span> strTextOld, <span style="COLOR: blue">string</span> strTextNew, <span style="COLOR: blue">bool</span> ignoreHTML)</p>
<p style="MARGIN: 0px">{</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">if</span> (<span style="COLOR: blue">string</span>.IsNullOrEmpty(strTextOld))</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">throw</span> <span style="COLOR: blue">new</span> ArgumentNullException(&#8220;strTextOld&#8221;,</p>
<p style="MARGIN: 0px">  <span style="COLOR: blue"><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
</font>string</span>.Format(</p>
<p style="MARGIN: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&#8220;Parameter darf nicht leer sein! Parametername {0}&#8221;, </p>
<p style="MARGIN: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strTextOld));</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">if</span> (<span style="COLOR: blue">string</span>.IsNullOrEmpty(strTextNew))</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">throw</span> <span style="COLOR: blue">new</span> ArgumentNullException(&#8220;strTextNew&#8221;,</p>
<p style="MARGIN: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="COLOR: blue">string</span>.Format(</p>
<p style="MARGIN: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&#8220;Parameter darf nicht leer sein! Parametername {0}&#8221;, </p>
<p style="MARGIN: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
strTextNew));</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">if</span>(ignoreHTML)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; strTextNew = EleminateHtml(strTextNew);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">string</span>[] arWordsAlt =   strTextOld.Split(<span style="COLOR: blue">new</span> Char[] { &#8216; &#8216; });</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">string</span>[] arWordsNeu =   strTextNew.Split(<span style="COLOR: blue">new</span> Char[] { &#8216; &#8216; });</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">int</span> iLen1 = arWordsAlt.Length;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">int</span> iLen2 = arWordsNeu.Length;</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">if</span> (iLen1 &gt; iLen2)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; Array.Resize(<span style="COLOR: blue">ref</span> arWordsNeu, iLen1);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; arWordsNeu = ChkNullValues(arWordsNeu);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">else</span> <span style="COLOR: blue">if</span> (iLen1 &lt; iLen2)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; Array.Resize(<span style="COLOR: blue">ref</span> arWordsAlt, iLen2);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; arWordsAlt = ChkNullValues(arWordsAlt);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">string</span> strNewVal = <span style="COLOR: blue">string</span>.Empty;</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">for</span> (<span style="COLOR: blue">int</span> i = 0; i &lt; arWordsAlt.Length; i++)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">if</span> (!arWordsAlt[i].Equals(arWordsNeu[i], StringComparison.Ordinal))</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strNewVal += &#8220;&lt;b&gt;&#8221; + arWordsNeu[i] + &#8220;&lt;/b&gt;&#8221; + &#8216; &#8216;;</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">else</span></p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strNewVal += arWordsAlt[i] + &#8216; &#8216;;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">return</span> (strNewVal);</p>
<p style="MARGIN: 0px">}</p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> Prüft, ob im Array Null-Werte vorhanden sind.</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> Wenn ja, dann mit Leer-String auffüllen</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;/summary&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;param name=&#8221;pArray&#8221;&gt;</span><span style="COLOR: green">Das Array mit den Inhaltswerten.</span><span style="COLOR: gray">&lt;/param&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;returns&gt;&lt;/returns&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">private</span> <span style="COLOR: blue">static</span> <span style="COLOR: blue">string</span>[] ChkNullValues(<span style="COLOR: blue">string</span>[] pArray)</p>
<p style="MARGIN: 0px">{</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">if</span>(pArray.Length &gt; 0)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">for</span>(<span style="COLOR: blue">int</span> i = 0; i &lt; pArray.Length;i++)</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="COLOR: blue">if</span>(<span style="COLOR: blue">string</span>.IsNullOrEmpty(pArray[i]))</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pArray.SetValue(<span style="COLOR: blue">string</span>.Empty, i);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; }</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">return</span> pArray;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p style="MARGIN: 0px">}&nbsp; </p>
<p style="MARGIN: 0px">&nbsp;</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">private</span> <span style="COLOR: blue">static</span> <span style="COLOR: blue">string</span> EleminateHtml(<span style="COLOR: blue">string</span> pString)</p>
<p style="MARGIN: 0px">{</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">string</span> newString = <span style="COLOR: blue">string</span>.Empty;</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: green">//Tags entfernen</span></p>
<p style="MARGIN: 0px">&nbsp; &nbsp; Regex textreplace =     <span style="COLOR: blue">new</span> Regex(&#8220;(&lt;[^&gt;]*&gt;)&#8221;);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; newString = textreplace.Replace(pString, &#8220;&#8221;);</p>
<p style="MARGIN: 0px">&nbsp; &nbsp; <span style="COLOR: blue">return</span> newString;</p>
<p style="MARGIN: 0px">}</p>
</div>
<p><!--EndFragment--></p>
<p>Das Demo-Projekt kannst Du dir hier herunterladen: [<a href="http://www.martin-fredrich.de/wp-content/uploads/TextComparer.rar">Download</a>] </p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2008/09/strings-vergleichen-und-unterschiede-visuell-darstellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lokalisierte Satellitenassembly</title>
		<link>http://www.martin-fredrich.de/2008/06/lokalisierte-satellitenassembly/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lokalisierte-satellitenassembly</link>
		<comments>http://www.martin-fredrich.de/2008/06/lokalisierte-satellitenassembly/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 10:16:38 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/2008/06/lokalisierte-satellitenassembly/</guid>
		<description><![CDATA[Ich habe mir heute einen Wolf gesucht, um herauszufinden was folgende Warnmeldung im Visual Studio bedeutet: Assemblygenerierung &#8212; Die Assembly &#8220;NameDerAssembly&#8221;, auf die verwiesen wird, ist eine lokalisierte Satellitenassembly&#8221; In der MSDN steht dazu: Die Assembly &#8216;Dateiname&#8217;, auf die verwiesen &#8230; <a href="http://www.martin-fredrich.de/2008/06/lokalisierte-satellitenassembly/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ich habe mir heute einen Wolf gesucht, um herauszufinden was folgende Warnmeldung im Visual Studio bedeutet:</p>
<blockquote><p>
Assemblygenerierung &#8212; Die Assembly &#8220;NameDerAssembly&#8221;, auf die verwiesen wird, ist eine lokalisierte Satellitenassembly&#8221;
</p></blockquote>
<p>In der <a href="http://msdn.microsoft.com/de-de/library/kchwc1f1(VS.80).aspx">MSDN</a> steht dazu:</p>
<blockquote><p>
Die Assembly &#8216;Dateiname&#8217;, auf die verwiesen wird, ist eine lokalisierte Satellitenassembly.<br />
Bei der Erstellung der aktuellen Assembly wurde auf eine mit dem AssemblyCultureAttribute-Attribut erstellte Assembly verwiesen. Das AssemblyCultureAttribute-Attribut weist darauf hin, dass die Datei eine lokalisierte Satellitenassembly ist und dass normalerweise nicht auf Satellitenassemblys verwiesen wird. Sie müssen stattdessen wahrscheinlich auf die übergeordnete Hauptassembly verweisen.
</p></blockquote>
<p>Es hat eine ganze Zeit gedauert, bis ich verstanden habe, was damit gemeint ist.<br />
In der Assembly, auf die ich verwiesen habe, stand in der AssemblyInfo.cs der Eintrag<br />
<code>[assembly: AssemblyCulture("DE")]</code></p>
<p>Ersetzt man den Eintrag durch diese Zeile<br />
<code>[assembly: AssemblyCulture("")]	</code></p>
<p>ist die Warnung verschwunden. Eigentlich trivial &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2008/06/lokalisierte-satellitenassembly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatischer Druck von Crystal Reports-Dokumenten aus einer Web-Anwendung</title>
		<link>http://www.martin-fredrich.de/2007/04/automatischer-druck-von-crystal-reports-dokumenten-aus-einer-web-anwendung/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=automatischer-druck-von-crystal-reports-dokumenten-aus-einer-web-anwendung</link>
		<comments>http://www.martin-fredrich.de/2007/04/automatischer-druck-von-crystal-reports-dokumenten-aus-einer-web-anwendung/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 13:25:21 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Crystal Reports]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=159</guid>
		<description><![CDATA[Problem: Auf einem Server läuft eine Web-Applikation, mit einem Service der automatisch eingehende Daten verarbeitet. Über einen Zentralrechner (Host) werden Textdateien in ein Verzeichnis geschoben, welches von einem Filewatcher überwacht wird. Wenn neue Dateien ankommen, wird der Inhalt der Dateien &#8230; <a href="http://www.martin-fredrich.de/2007/04/automatischer-druck-von-crystal-reports-dokumenten-aus-einer-web-anwendung/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> Auf einem Server läuft eine Web-Applikation, mit einem Service der automatisch eingehende Daten verarbeitet. Über einen Zentralrechner (Host) werden Textdateien in ein Verzeichnis geschoben, welches von einem Filewatcher überwacht wird.<br />
Wenn neue Dateien ankommen, wird der Inhalt der Dateien weiterverarbeitet und Berichte erzeugt. Wenn eine eMail-Adresse angegeben ist, wird ein Bericht im pdf-Format erstellt und an den Adressaten via eMail versendet. Ist keine eMail-Adresse angegeben, soll der Bericht auf dem jeweiligen Abteilungsdrucker ausgedruckt werden.</p>
<p>Die Erzeugung eines pdf mit Hilfe von Crystal Reports und der Versand per eMail ist trivial und stellt kein wirkliches Problem dar. Wie drucke ich jedoch, automatisch und ohne Druckdialog, von Crystal erzeugte Berichte aus?<br />
[<a href="http://www.martin-fredrich.de/automatischer-druck-von-crystal-reports-dokumenten/">weiterlesen</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2007/04/automatischer-druck-von-crystal-reports-dokumenten-aus-einer-web-anwendung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tipps, Tricks und Kniffe für Crystal Reports</title>
		<link>http://www.martin-fredrich.de/2006/12/tipps-tricks-und-kniffe-fur-crystal-reports/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tipps-tricks-und-kniffe-fur-crystal-reports</link>
		<comments>http://www.martin-fredrich.de/2006/12/tipps-tricks-und-kniffe-fur-crystal-reports/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 15:44:07 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Crystal Reports]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=149</guid>
		<description><![CDATA[Wer schon einmal einen Bericht mit Crystal Reports erstellt hat, weiß wie mächtig und wie beliebig nervig der Umgang mit diesem Werkzeug ist. Wie jeder andere Formulargenerator hat auch Crystal seine Macken, Stärken und Schwächen. Ich werde hier in loser &#8230; <a href="http://www.martin-fredrich.de/2006/12/tipps-tricks-und-kniffe-fur-crystal-reports/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wer schon einmal einen Bericht mit Crystal Reports erstellt hat, weiß wie mächtig und wie beliebig nervig der Umgang mit diesem Werkzeug ist. Wie jeder andere Formulargenerator hat auch Crystal seine Macken, Stärken und Schwächen.</p>
<p>Ich werde hier in loser Reihenfolge Beispiele und Lösungen vorstellen, die mir bei meiner Arbeit mit Crystal Reports geholfen haben, bzw. für dessen Lösung ich lange suchen musste.</p>
<p>Und hier geht es los [<a href="http://www.martin-fredrich.de/tipps-tricks-und-kniffe-fur-crystal-reports/">mehr</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2006/12/tipps-tricks-und-kniffe-fur-crystal-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reguläre Ausdrücke in C#</title>
		<link>http://www.martin-fredrich.de/2006/06/regulare-ausdrucke-in-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=regulare-ausdrucke-in-c</link>
		<comments>http://www.martin-fredrich.de/2006/06/regulare-ausdrucke-in-c/#comments</comments>
		<pubDate>Thu, 08 Jun 2006 16:02:00 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[RegEx]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=121</guid>
		<description><![CDATA[Reguläre Ausdrücke sind ein mächtiges Programmierwerkzeug, doch die meisten Entwickler die ich kenne, benutzen diese ungern, da die Syntax doch sehr kryptisch ist. Ich benutze die RegEx-Klasse immer häufiger und deshalb werde hier einfach einmal ein kleines Tutorial, ohne den &#8230; <a href="http://www.martin-fredrich.de/2006/06/regulare-ausdrucke-in-c/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Reguläre Ausdrücke sind ein mächtiges Programmierwerkzeug, doch die meisten Entwickler die ich kenne, benutzen diese ungern, da die Syntax doch sehr kryptisch ist. Ich benutze die RegEx-Klasse immer häufiger und deshalb werde hier einfach einmal ein kleines Tutorial, ohne den Anspruch der Vollständigkeit vorstellen.  [<a href="http://www.martin-fredrich.de/regulaere-ausdruecke-in-csharp/">mehr</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2006/06/regulare-ausdrucke-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Demo-Anwendung von Microsoft für .NET 2.0</title>
		<link>http://www.martin-fredrich.de/2006/02/demo-anwendung-von-microsoft-fur-net-20/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=demo-anwendung-von-microsoft-fur-net-20</link>
		<comments>http://www.martin-fredrich.de/2006/02/demo-anwendung-von-microsoft-fur-net-20/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 12:39:39 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=64</guid>
		<description><![CDATA[Am Beispiel lernen: Microsoft stellt AdventureWorks Cinema 1.0 online zur Verfügung. AdventureWorks Cinema ist eine verteilte Client-Server-Anwendung, mit deren Hilfe Microsoft sowohl .NET-Anfängern als auch &#8220;leicht Fortgeschrittenen&#8221; die Integration verschiedener Client-Applikationen für Windows, Office, Windows Mobile und Webanwendungen am Beispiel &#8230; <a href="http://www.martin-fredrich.de/2006/02/demo-anwendung-von-microsoft-fur-net-20/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Am Beispiel lernen: Microsoft stellt AdventureWorks Cinema 1.0 online zur Verfügung.</p>
<blockquote><p>AdventureWorks Cinema ist eine verteilte Client-Server-Anwendung, mit deren Hilfe Microsoft sowohl .NET-Anfängern als auch &#8220;leicht Fortgeschrittenen&#8221; die Integration verschiedener Client-Applikationen für Windows, Office, Windows Mobile und Webanwendungen am Beispiel einfacher Vorgänge aus dem Kino-Umfeld demonstrieren will; das Ganze natürlich mit .NET.</p>
<p>Das Szenario: Ein fiktiver Kinobetreiber stellt seinen Kunden neben Kinokarten auch Informationen zu Filmen zur Verfügung. Die Anwendung stellt dazu passende Workflows, die denen eines Online-Shops ähneln, und Clients für Kinobetreiber und Filmbesucher bereit. Auf Seiten des Kinobetreibers sind dies eine Windows-Forms- und eine Office-Anwendung, auf Seiten des Kunden eine Web-Forms-Anwendung sowie ein Client für das .NET Compact Framework. Somit sind die wichtigsten Client-Typen abgedeckt. Entwickelt wurde AnventureWorks Cinema mit Visual Studio 2005 und Visual Studio 2005 Tools for Office.   </p></blockquote>
<p>Mehr Informationen und download hier:<br />
<a href="http://www.microsoft.com/germany/msdn/library/vs2005/samples/default.mspx" target="_blank">http://www.microsoft.com/germany/&#8230;/default.mspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2006/02/demo-anwendung-von-microsoft-fur-net-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ViewStates auf dem Server speichern</title>
		<link>http://www.martin-fredrich.de/2005/10/viewstates-auf-dem-server-speichern/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=viewstates-auf-dem-server-speichern</link>
		<comments>http://www.martin-fredrich.de/2005/10/viewstates-auf-dem-server-speichern/#comments</comments>
		<pubDate>Mon, 31 Oct 2005 15:32:32 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tipps + Tricks]]></category>

		<guid isPermaLink="false">http://www.martin-fredrich.de/?p=25</guid>
		<description><![CDATA[In einem meiner letzten ASP.NET-Projekte wurden die ViewStates ziemlich exzessiv eingesetzt. ViewStates sind eine tolle Sache, aber wenn viele Daten im ViewState gespeichert werden leidet irgendwann die Performance, da diese in einem hidden-Field ständig mitgeladen werden. Ein Lösungsansatz wäre, den &#8230; <a href="http://www.martin-fredrich.de/2005/10/viewstates-auf-dem-server-speichern/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In einem meiner letzten ASP.NET-Projekte wurden die ViewStates ziemlich exzessiv eingesetzt. ViewStates sind eine tolle Sache, aber wenn viele Daten im ViewState gespeichert werden leidet irgendwann die Performance, da diese in einem hidden-Field ständig mitgeladen werden. Ein Lösungsansatz wäre, den ViewState nicht mehr im Client zu speichern, sondern physikalisch auf dem Server abzulegen. Dabei werden nicht selten 40-60 Kb an Datenvolumen pro Seite eingespart.  <a href="http://www.martin-fredrich.de/?page_id=26">Weiterlesen &#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martin-fredrich.de/2005/10/viewstates-auf-dem-server-speichern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

