<?xml version="1.0" encoding="iso-8859-9"?>
<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>Coskun SUNALI &#124; .net framework, c#, asp.net, atlas, visual studio, iis and everything else &#187; resource files</title>
	<atom:link href="http://sunali.com/tag/resource-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://sunali.com</link>
	<description>Coşkun SUNALI</description>
	<lastBuildDate>Fri, 12 Feb 2010 12:35:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The resource object with key &#8230; was not found</title>
		<link>http://sunali.com/2009/10/01/the-resource-object-with-key-was-not-found/</link>
		<comments>http://sunali.com/2009/10/01/the-resource-object-with-key-was-not-found/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 14:32:26 +0000</pubDate>
		<dc:creator>Coskun SUNALI</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[know how]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[resource files]]></category>

		<guid isPermaLink="false">http://sunali.com/?p=418</guid>
		<description><![CDATA[If you ever face problems with your resources and somehow the ASP.NET application/website refuses to load them, consider checking if your website path is readable by the process owner user of the website application pool.]]></description>
			<content:encoded><![CDATA[<p>If you ever face problems with your resources and somehow the ASP.NET application/website refuses to load them, consider checking if your website path is readable by the process owner user of the website application pool.</p>
]]></content:encoded>
			<wfw:commentRss>http://sunali.com/2009/10/01/the-resource-object-with-key-was-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resource dosyasından resim gösterme</title>
		<link>http://sunali.com/2005/02/14/resource-dosyasyndan-resim-gosterme/</link>
		<comments>http://sunali.com/2005/02/14/resource-dosyasyndan-resim-gosterme/#comments</comments>
		<pubDate>Sun, 13 Feb 2005 21:00:49 +0000</pubDate>
		<dc:creator>Coskun SUNALI</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[resource files]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Framework 2.0&#8242;da yarattığınız herhangi bir resource dosyanıza herhangi bir dosya eklemek için resgen aracını kullanmanıza gerek yok. Resx dosyanızı Visual Studio ile açmanız ve &#8220;Yeni resim ekle&#8221; seçeneğini seçmeniz durumunda sizden direkt olarak eklemek istediğiniz resmin yolunu istiyor. Normal olarak resx dosyanıza attığınız bir dosyayı framework 2.0&#8242;da Resources.[ResxDosyasınınİsmi].[Dosyanınİsmi] şeklinde alabilmeniz mümkün. Mesela Resimler.resx isminde bir]]></description>
			<content:encoded><![CDATA[<p>Framework 2.0&#8242;da yarattığınız herhangi bir resource dosyanıza herhangi bir dosya eklemek için <em>resgen</em> aracını kullanmanıza gerek yok. Resx dosyanızı Visual Studio ile açmanız ve &#8220;Yeni resim ekle&#8221; seçeneğini seçmeniz durumunda sizden direkt olarak eklemek istediğiniz resmin yolunu istiyor.</p>
<p>Normal olarak <em>resx</em> dosyanıza attığınız bir dosyayı framework 2.0&#8242;da <code>Resources.[ResxDosyasınınİsmi].[Dosyanınİsmi]</code> şeklinde alabilmeniz mümkün.</p>
<p><span id="more-1"></span>Mesela <em>Resimler.resx</em> isminde bir dosyanız olduğunu varsayalım ve bu dosyanın içine de <em>Resim.gif</em> isminde bir resim koyduk. Bu resmi almak ve ekrana bastırabilmek için tek yapmamız gereken şudur:</p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent">Bitmap bmp </span><span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> Resources.Resimler.Resim;<br />
bmp.Save ( Response.OutputStream, ImageFormat.Gif );</p>
<p>Diyelim ki <em>Resim.aspx</em> isminde bir dosyanız var ve bu dosya da sizin resource dosyanızdaki resimlerinizi almanıza yarıyor. Bu durum da <em>Resim.aspx</em> dosyanızı çağırırken, bu dosyaya <em>QueryString</em> aracılığı ile hangi resmi istediğinizi belirtmek istemeniz muhtemel. Bu durumda yukarıdaki yöntem işe yaramayacaktır. Çünkü framework 2.0 yukarıdaki kodda parametrik kullanıma izin vermiyor. Bunun yerine aşağıdaki gibi bir yapı kullanabilirsiniz.</p>
<p><em>Aşağıdaki kodda, resource dosyanızın içinde &#8220;ResimBulunamadi&#8221; isminde bir resminizin bulunduğunu varsayıyorum.</em></p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"></span><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">string</span> resim <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> Request.QueryString[<span style="font-size: 11px; color: #666666; font-family: Courier New; background-color: #e4e4e4">"Resim"</span>];</p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"></span><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">if</span> ( resim == <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">null</span> )<br />
    resName <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> <span style="font-size: 11px; color: #666666; font-family: Courier New; background-color: #e4e4e4">&#8220;ResimBulunamadi&#8221;</span>;<br />
<span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><br />
Bitmap bmp </span><span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> ( Bitmap )Resources.Images.ResourceManager.GetObject( resim );</p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"></span><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">if</span> ( bmp == <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">null</span> )<br />
    bmp <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> ( Bitmap )Resources.Images.ResourceManager.GetObject( <span style="font-size: 11px; color: #666666; font-family: Courier New; background-color: #e4e4e4">&#8220;ResimBulunamadi&#8221;</span> );</p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent">bmp.Save( Response.OutputStream , ImageFormat.Gif );</span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"> </span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"> </p>
<p></span> </p>
<p><font face="Courier New" /></p>
]]></content:encoded>
			<wfw:commentRss>http://sunali.com/2005/02/14/resource-dosyasyndan-resim-gosterme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
