<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Alexander Shapovalov</title>
	
	<link>http://alexandershapovalov.com/blog</link>
	<description>personal blog</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:44:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AlexanderShapovalov" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="alexandershapovalov" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How to create free website based on open source CMS</title>
		<link>http://alexandershapovalov.com/blog/2010/03/11/how-to-create-free-website-based-on-open-source-cms/</link>
		<comments>http://alexandershapovalov.com/blog/2010/03/11/how-to-create-free-website-based-on-open-source-cms/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 09:44:35 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[free cms]]></category>
		<category><![CDATA[open source cms]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/2010/03/11/how-to-create-free-website-based-on-open-source-cms/</guid>
		<description><![CDATA[<p>It is very easy to create free website and if you belive than it’s not possible, you are wrong. I tell you how to create your own free website based on open source CMS – Atomic CMS. </p>
<p>Atomic CMS is a free open source CMS (content management system) developed on ASP.NET MVC platform. It is [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to create <a href="http://atomiccms.com/" target="_blank">free website</a> and if you belive than it’s not possible, you are wrong. I tell you how to create your own free website based on <a href="http://atomiccms.com/" target="_blank">open source CMS</a> – Atomic CMS. </p>
<p>Atomic CMS is a free <a href="http://atomiccms.com/" target="_blank">open source CMS</a> (content management system) developed on ASP.NET MVC platform. It is easy to use and customize CMS which enables you to quickly create website and quickly develop new skins. </p>
<p>All than you need to create <strong>free website</strong> is hosting supporting ASP.NET 3.5 (most of the hostings support it) and Atomic CMS. </p>
<p>After you find hosting, you need to download Atomic CMS and extract it to your hosting. Than you have to install database scripts and change connection string in configuration file to make you website work with this database. </p>
<p>And it is all. Now your have free website based on <a href="http://atomiccms.com/" target="_blank">open source CMS</a>. Atomic CMS have a number of templates and good guide how to create new templates, so you can use existing template or create your own. </p>
<p>You can find more detailed manual how to install Atomic CMS at it <a href="http://atomiccms.com/" target="_blank">official website</a>. Also you can find more information about free open source CMS there.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2010/03/11/how-to-create-free-website-based-on-open-source-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle full text search with ASP.NET</title>
		<link>http://alexandershapovalov.com/blog/2009/12/08/oracle-full-text-search-with-asp-net/</link>
		<comments>http://alexandershapovalov.com/blog/2009/12/08/oracle-full-text-search-with-asp-net/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 14:30:44 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/2009/12/08/oracle-full-text-search-with-asp-net/</guid>
		<description><![CDATA[<p>First you need oracle full text search to be installed.</p>
<p>Then you have to create index on some field in table, this field can be any type: text, number or even file. Oracle text search supports pdf, doc,… and some other file types. </p>
<p>for example we have a table MyTable with following structure</p>
<p>Id number   [...]]]></description>
			<content:encoded><![CDATA[<p>First you need oracle full text search to be installed.</p>
<p>Then you have to create index on some field in table, this field can be any type: text, number or even file. Oracle text search supports pdf, doc,… and some other file types. </p>
<p>for example we have a table <strong>MyTable</strong> with following structure</p>
<p>Id number    <br />title nvarchar(50)     <br />attachment blob</p>
<p>field attachment contains files in format pdf, txt, doc… </p>
<p>if you try to search text ‘find me’ on column attachment, you will get error message, because this column is not indexed, </p>
<pre class="brush: sql;">Select tbl.id, tbl.title, tbl.attachment from MyTable tbl
Where contains (tbl.attachment, ‘find me’);</pre>
<p>After you create index, you can search in this fields. To create index run the following statement</p>
<pre class="brush: sql;">Create index my_index_name_attachment_idx on MyTable(attachment) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC ( ON COMMIT)')</pre>
<p>And now you can select data from table and the oracle full text search works.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/12/08/oracle-full-text-search-with-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to call WCF services from JavaScript jQuery and ASP.NET AJAX</title>
		<link>http://alexandershapovalov.com/blog/2009/12/02/how-to-call-wcf-services-from-javascript-jquery-and-asp-net-ajax/</link>
		<comments>http://alexandershapovalov.com/blog/2009/12/02/how-to-call-wcf-services-from-javascript-jquery-and-asp-net-ajax/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:48:55 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/2009/12/02/how-to-call-wcf-services-from-javascript-jquery-and-asp-net-ajax/</guid>
		<description><![CDATA[<p>First we have to create a webapplication and add to it Ajax enabled WCF service.</p>
<p>Change default DoWork method to accept parameter</p>
        [OperationContract]
        public string DoWork(string userName)
        {
        [...]]]></description>
			<content:encoded><![CDATA[<p>First we have to create a webapplication and add to it Ajax enabled WCF service.</p>
<p>Change default DoWork method to accept parameter</p>
<pre class="brush: csharp; gutter: false;">        [OperationContract]
        public string DoWork(string userName)
        {
            // Add your operation implementation here
            return &quot;Hello &quot; + userName;
        }</pre>
<p>First add on the page input text control and two buttons.</p>
<pre class="brush: xml; gutter: false;">        &lt;input type=&quot;text&quot; name=&quot;txtName&quot; id=&quot;txtName&quot; /&gt;
        &lt;input type=&quot;button&quot; value=&quot;jQuery call&quot; onclick=&quot;cityClickJQuery();&quot; /&gt;
        &lt;input type=&quot;button&quot; value=&quot;ASP.NET AJAX Call&quot; onclick=&quot;cityClick();&quot; /&gt;</pre>
<p>First we will call this method with jQuery. So reference jQuery library and add this javascript function for calling WCF service</p>
<pre class="brush: js; gutter: false;">        function cityClickJQuery()
        {
            $.ajax({
                type: &quot;POST&quot;,
                url: &quot;http://localhost:65424/CityService.svc/DoWork&quot;,
                data: '{&quot;userName&quot;:&quot;'+$get(&quot;txtName&quot;).value+'&quot;}',
                processData:false,
                contentType: &quot;application/json; charset=utf-8&quot;,
                dataType: &quot;json&quot;,
                success: function(data)
                {
                    alert(data.d);
                }
            });
        }</pre>
<p>It’s very easy, you have to pass url with method, parameter (value from textbox) specify data type and callback function.</p>
<p>Now you can run webapplication, put some text in input box and press button “jQuery call”</p>
<p><a href="http://alexandershapovalov.com/blog/wp-content/uploads/2009/12/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="193" alt="image" src="http://alexandershapovalov.com/blog/wp-content/uploads/2009/12/image_thumb.png" width="432" border="0" /></a> </p>
<p>&#160;</p>
<p>Calling WCF service with Microsoft Ajax is much more easy. You do not to provide most of the properties like jQuery call.</p>
<pre class="brush: js; gutter: false;">        function cityClick()
        {
            CityService.DoWork($get(&quot;txtName&quot;).value, onSuccess);
        }

        function onSuccess(data)
        {
            if (data)
                alert(data);
        }</pre>
<p>After pressing button, you will have the same result.</p>
<p><a href="http://alexandershapovalov.com/blog/wp-content/uploads/2009/12/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="193" alt="image" src="http://alexandershapovalov.com/blog/wp-content/uploads/2009/12/image_thumb.png" width="432" border="0" /></a> </p>
<p>&#160;</p>
</p>
<p>All source code can bi found below. I did not change web.config, so you can use default data generated by VisualStudio.</p>
<p>ASPX page:</p>
<pre class="brush: xml; collapse: true;">&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Default.aspx.cs&quot;
    Inherits=&quot;WebApplication1._Default&quot; %&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;&lt;/title&gt;

    &lt;script src=&quot;jquery-1.3.2.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;jquery-1.3.2-vsdoc.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;
        function cityClickJQuery()
        {
            $.ajax({
                type: &quot;POST&quot;,
                url: &quot;http://localhost:65424/CityService.svc/DoWork&quot;,
                data: '{&quot;userName&quot;:&quot;'+$get(&quot;txtName&quot;).value+'&quot;}',
                processData:false,
                contentType: &quot;application/json; charset=utf-8&quot;,
                dataType: &quot;json&quot;,
                success: function(data)
                {
                    alert(data.d);
                }
            });
        }
        function cityClick()
        {
            CityService.DoWork($get(&quot;txtName&quot;).value, onSuccess);
        }

        function onSuccess(data)
        {
            if (data)
                alert(data);
        }
    &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
        &lt;asp:ScriptManager runat=&quot;server&quot;&gt;
            &lt;Services&gt;
                &lt;asp:ServiceReference Path=&quot;~/CityService.svc&quot; /&gt;
            &lt;/Services&gt;
        &lt;/asp:ScriptManager&gt;

        &lt;div style=&quot;background-color:#eee;&quot;&gt;

        &lt;input type=&quot;text&quot; name=&quot;txtName&quot; id=&quot;txtName&quot; /&gt;
        &lt;input type=&quot;button&quot; value=&quot;jQuery call&quot; onclick=&quot;cityClickJQuery();&quot; /&gt;
        &lt;input type=&quot;button&quot; value=&quot;ASP.NET AJAX Call&quot; onclick=&quot;cityClick();&quot; /&gt;
        &lt;/div&gt;

    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>&#160;</p>
<p>C# code:</p>
<pre class="brush: csharp; collapse: true;">namespace WebApplication1
{
    using System.ServiceModel;
    using System.ServiceModel.Activation;

    [ServiceContract(Namespace = &quot;&quot;)]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class CityService
    {
        // Add [WebGet] attribute to use HTTP GET
        [OperationContract]
        public string DoWork(string userName)
        {
            // Add your operation implementation here
            return &quot;Hello &quot; + userName;
        }

        // Add more operations here and mark them with [OperationContract]
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/12/02/how-to-call-wcf-services-from-javascript-jquery-and-asp-net-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Referencing JavaScript files from MasterPage</title>
		<link>http://alexandershapovalov.com/blog/2009/11/12/referencing-javascript-files-from-masterpage/</link>
		<comments>http://alexandershapovalov.com/blog/2009/11/12/referencing-javascript-files-from-masterpage/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 10:26:28 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/2009/11/12/referencing-javascript-files-from-masterpage/</guid>
		<description><![CDATA[<p>To avoid problems with pathes you can you “~” at the start of your ulr. But this works only for controls with runat=”server” attribute. You can add this attribute to head tag. </p>
<p>&#60;head runat=&#34;server&#34;&#62;</p>
<p>It works fine for css links</p>
&#60;link href=&#34;~/styles/style.css&#34;
rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&#62;
<p>But if you will try to add this attribte to scritp tag you will [...]]]></description>
			<content:encoded><![CDATA[<p>To avoid problems with pathes you can you “~” at the start of your ulr. But this works only for controls with runat=”server” attribute. You can add this attribute to head tag. </p>
<p>&lt;head runat=&quot;server&quot;&gt;</p>
<p>It works fine for css links</p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;link href=&quot;~/styles/style.css&quot;
rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</pre>
<p>But if you will try to add this attribte to scritp tag you will have compiler error</p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;script type=”text/javascript”
src=”~/scripts/myScript.js” runat=server/&gt;</pre>
<p>But there are another solution, use ResolveUrl method</p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;script src=&quot;&lt;%=ResolveUrl(&quot;~/Scripts/jquery-1.3.2.js&quot;) %&gt;&quot;
type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre>
<p>But somtimes this method trow error</p>
<p>The Controls collection cannot be modified because the control contains code blocks (i.e. &lt;% &#8230; %&gt;).</p>
<p>It’s because of “=” in “&lt;%=”. But it can be resolved very easy using “#” databinding expression.</p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;script src=&quot;&lt;%#ResolveUrl(&quot;~/Scripts/jquery-1.3.2.js&quot;) %&gt;&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; </pre>
<p>But do not forget to bind this url in pageLoad event</p>
<pre class="brush: csharp; gutter: false; toolbar: false;">protected override void OnLoad(System.EventArgs e)
{
    base.OnLoad(e);
    Page.Header.DataBind();
} </pre>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/11/12/referencing-javascript-files-from-masterpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resharper 4.5.1 was released</title>
		<link>http://alexandershapovalov.com/blog/2009/07/24/resharper-4-5-1-was-released/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/24/resharper-4-5-1-was-released/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 12:26:43 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[Resharper]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/?p=129</guid>
		<description><![CDATA[<p>Jetbrains just released Resharper 4.5.1 Maintenance build, which can be downloaded here.
There are a lot of bugs was fixed in this build. You can seed release notes here.</p>
<p>It&#8217;s a free upgrade to all licensed users of 4.x version.</p>
]]></description>
			<content:encoded><![CDATA[<p>Jetbrains just released Resharper 4.5.1 Maintenance build, which can be <a href="http://www.jetbrains.com/resharper/download/">downloaded here</a>.<br />
There are a lot of bugs was fixed in this build. You can seed <a href="http://www.jetbrains.com/resharper/features/releaseNotes451.html">release notes here</a>.</p>
<p>It&#8217;s a free upgrade to all licensed users of 4.x version.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/24/resharper-4-5-1-was-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate to new version Nhibernate 2.1.0 with Oracle database</title>
		<link>http://alexandershapovalov.com/blog/2009/07/21/migrate-to-new-version-nhibernate-2-1-0-with-oracle-database/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/21/migrate-to-new-version-nhibernate-2-1-0-with-oracle-database/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 22:42:14 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/index.php/2009/07/21/migrate-to-new-version-nhibernate-2-1-0-with-oracle-database/</guid>
		<description><![CDATA[<p>A couple of days ago new version of Nhibernate was released. You can download new version here.&#160; </p>
<p>And if you migrate to this version and using Oracle database,    You will get this exception     </p>
<p>Could not load type NHibernate.Dialect.OracleDialect. Possible cause: no assembly name specified</p>

<p>The reason is, you need [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago new version of Nhibernate was released. <a href="http://sourceforge.net/projects/nhibernate/files/NHibernate/NHibernate-2.1.0.GA-bin.zip/download">You can download new version here</a>.&#160; </p>
<p>And if you migrate to this version and using Oracle database,    <br />You will get this exception     </p>
<blockquote><p>Could not load type NHibernate.Dialect.OracleDialect. Possible cause: no assembly name specified</p>
</blockquote>
<p>The reason is, you need specify not OracleDialect, but Oracle8iDialect, Oracle9iDialect, Oracle10gDialect, or OracleLiteDialect instead.    <br />For example for oracle 10.x version you have to change dialect line in your hibernate.cfg.xml to this line </p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;property name=&quot;dialect&quot;&gt;NHibernate.Dialect.Oracle10gDialect&lt;/property&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/21/migrate-to-new-version-nhibernate-2-1-0-with-oracle-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building charts with Dundas Charts and SqlDataSource</title>
		<link>http://alexandershapovalov.com/blog/2009/07/17/building-charts-with-dundas-charts-and-sqldatasource/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/17/building-charts-with-dundas-charts-and-sqldatasource/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 23:46:52 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Dundas]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Charts]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/index.php/2009/07/17/building-charts-with-dundas-charts-and-sqldatasource/</guid>
		<description><![CDATA[<p>Dundas has a very good Chart controls which I am using now in my project. And if you are familiar with Microsoft Charts you can easy start using Dundas charts, because Microsoft Charts based on Dundas charts.</p>
<p>Chart controls support SqlDataSource, and all than you need is Bind SqlDataSource to Dundas charts and tell charts what [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dundas.com/">Dundas</a> has a very good Chart controls which I am using now in my project. And if you are familiar with Microsoft Charts you can easy start using Dundas charts, because Microsoft Charts based on Dundas charts.</p>
<p>Chart controls support SqlDataSource, and all than you need is Bind SqlDataSource to Dundas charts and tell charts what fields to use from DataSource.</p>
<p> <script type="text/javascript"><!--
google_ad_client = "pub-8074334941793073";
/* 468x60 baner for inside posts on blog.alexandershapovalov */
google_ad_slot = "8066250748";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;asp:SqlDataSource runat=&quot;server&quot; ProviderName=&quot;System.Data.OracleClient&quot; SelectCommand=&quot;select AxisX, AxisY from chart_values&quot;

    ID=&quot;SqlData&quot;&gt;&lt;/asp:SqlDataSource&gt;
&lt;DCWC:Chart ID=&quot;Chart1&quot; runat=&quot;server&quot; DataSourceID=&quot;SqlData&quot;
    Width=&quot;1000px&quot; Height=&quot;600px&quot;&gt;
    &lt;Legends&gt;
        &lt;DCWC:Legend TitleFont=&quot;Microsoft Sans Serif, 8pt, style=Bold&quot;
            BackColor=&quot;Transparent&quot; EquallySpacedItems=&quot;True&quot; Font=&quot;Trebuchet MS, 8pt, style=Bold&quot;
            AutoFitText=&quot;False&quot; Name=&quot;Default&quot;&gt;
        &lt;/DCWC:Legend&gt;
    &lt;/Legends&gt;
    &lt;Series&gt;
        &lt;DCWC:Series ValueMemberX=&quot;AxisX&quot; ValueMembersY=&quot;AxisY&quot;&gt;
        &lt;/DCWC:Series&gt;
    &lt;/Series&gt;
    &lt;ChartAreas&gt;
        &lt;DCWC:ChartArea Name=&quot;Default&quot;&gt;
            &lt;AxisX LineColor=&quot;Blue&quot;&gt;
            &lt;/AxisX&gt;
            &lt;AxisY LineColor=&quot;Red&quot;&gt;
            &lt;/AxisY&gt;
            &lt;Area3DStyle Enable3D=&quot;True&quot; /&gt;
        &lt;/DCWC:ChartArea&gt;
    &lt;/ChartAreas&gt;
&lt;/DCWC:Chart&gt;
</pre>
<p>
<a href="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image0011.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image001_thumb1.gif" width="275" height="116" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/17/building-charts-with-dundas-charts-and-sqldatasource/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Experts-exchange forum, how to use it for free?</title>
		<link>http://alexandershapovalov.com/blog/2009/07/15/experts-exchange-forum-how-to-use-it-for-free/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/15/experts-exchange-forum-how-to-use-it-for-free/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 00:44:44 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[Development Tricks]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[knowledge]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/index.php/2009/07/15/experts-exchange-forum-how-to-use-it-for-free/</guid>
		<description><![CDATA[<p>I believe all developers know this forum http://www.experts-exchange.com. Usually you can see it in the first position in Google while looking for information about programming. </p>
<p>But This forum is not free, and you have to pay $12.95 Monthly to access this forum. So most of the people who don&#8217;t want to pay usually skip this [...]]]></description>
			<content:encoded><![CDATA[<p>I believe all developers know this forum <a href="http://www.experts-exchange.com">http://www.experts-exchange.com</a>. Usually you can see it in the first position in Google while looking for information about programming. </p>
<p>But This forum is not free, and you have to pay $12.95 Monthly to access this forum. So most of the people who don&#8217;t want to pay usually skip this forum in Google search result.</p>
<p> <script type="text/javascript"><!--
google_ad_client = "pub-8074334941793073";
/* внутри постов 468x15_4 на blog.alexandershapovalov.com */
google_ad_slot = "0287831794";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<p>But you can read this forum for free!!!    <br />All than you need, is scroll down to the end of the page. And at the bottom you will see all the answers.</p>
<p>For example you can <a href="http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_22633754.html ">go to this page</a>     <br />Scroll down to the bottom of the page and see answers for free.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/15/experts-exchange-forum-how-to-use-it-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global.asax file events for Application and Session</title>
		<link>http://alexandershapovalov.com/blog/2009/07/14/global-asax-file-events-for-application-and-session/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/14/global-asax-file-events-for-application-and-session/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 00:42:46 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/index.php/2009/07/14/global-asax-file-events-for-application-and-session/</guid>
		<description><![CDATA[<p>Global.asax file comes in ASP.NET from ASP language. This file contains events for Application and Session, and global.asax must be in the root directory of .net web application.</p>
<p>Below is the list of events in global.asax file you can call.</p>
Application events in global.asax:
<p>Application_Start:     This event used to set up an application environment [...]]]></description>
			<content:encoded><![CDATA[<p>Global.asax file comes in ASP.NET from ASP language. This file contains events for Application and Session, and global.asax must be in the root directory of .net web application.</p>
<p>Below is the list of events in global.asax file you can call.</p>
<h4>Application events in global.asax:</h4>
<p><strong>Application_Start</strong>:     <br />This event used to set up an application environment and called only when the application starts first time.</p>
<p><strong>Application_Init</strong>:    <br />This method occurs after Application_Start and is used for initializing your code.</p>
<p><strong>Application_Disposed</strong>:     <br />This event occurs before destroying an instance of an application.</p>
<p><strong>Application_Error</strong>:     <br />This event is used to handle all unhandled exceptions in the application. It&#8217;s the best place to put your error tracking mechanism.</p>
<p><strong>Application_End</strong>:     <br />Like classic ASP method it used to clean up variables and memory while application ends.</p>
<p><strong>Application_BeginRequest</strong>:     <br />This event occurs when a client makes a request to any pages of the application. It can be useful for example to open connection to database for all request.</p>
<p><strong>Application_EndRequest</strong>:    <br />This is the last request to the page.</p>
<p><strong>Application_PreRequestHandlerExecute</strong>:    <br />This event occurs before ASP.Net begins executing a handler such as a page or a web service. At this point, the session state is available.</p>
<p><strong>Application_PostRequestHandlerExecute</strong>:     <br />This method occurs when the ASP.Net handler finishes execution.</p>
<p><strong>Application_PreSendRequestHeaders</strong>:    <br />This event occurs just before ASP.Net sends HTTP Headers to the client. You can use it if you want to modify a header</p>
<p><strong>Application_PreSendRequestContent</strong>:     <br />This event occurs just before sending content to the client.</p>
<p><strong>Application_AcquireRequestState</strong>:     <br />This event occurs when ASP.Net acquires the current state (eg. Session state) associated with the current request.</p>
<p><strong>Application_ReleaseRequestState</strong>:     <br />This event occurs after ASP.NET finishes executing all request handlers and causes state modules to save the current state data.</p>
<p><strong>Application_AuthenticateRequest</strong>:    <br />This event occurs when the identity of the current user has been established as valid by the security module .</p>
<p><strong>Application_AuthorizeRequest</strong>:    <br />This event occurs when the user has been authorized to access the resources of the security module .</p>
<h4>Session events in global.asax:</h4>
<p><strong>Session_Start</strong>:     <br />As with classic ASP, this event is triggered when any new user accesses the web site.</p>
<p><strong>Session_End</strong>:    <br />As with classic ASP, this event is triggered when a user&#8217;s session times out or ends. The default session timeout is 20 min.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/14/global-asax-file-events-for-application-and-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle and SqlDataSource two way data binding</title>
		<link>http://alexandershapovalov.com/blog/2009/07/13/oracle-and-sqldatasource-two-way-data-binding/</link>
		<comments>http://alexandershapovalov.com/blog/2009/07/13/oracle-and-sqldatasource-two-way-data-binding/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 23:41:41 +0000</pubDate>
		<dc:creator>alexandershapovalov</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development Tricks]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://alexandershapovalov.com/blog/index.php/2009/07/13/oracle-and-sqldatasource-two-way-data-binding/</guid>
		<description><![CDATA[<p>Often you have to create a simple pages for your website, for example admin pages which allow you edit tables through web. When working with Ms Sql server it’s a very easy task which you can solve with SqlDataSource and DataGrid. But using Oracle it’s difficult to make your page work without exceptions and you [...]]]></description>
			<content:encoded><![CDATA[<p>Often you have to create a simple pages for your website, for example admin pages which allow you edit tables through web. When working with Ms Sql server it’s a very easy task which you can solve with SqlDataSource and DataGrid. But using Oracle it’s difficult to make your page work without exceptions and you have to know some tricks for using Oracle with SqlDataSource.</p>
<p>To develop webpage you can start with user interface. Put SqlDataSource and DataGrid on the page, and add css class if needed.</p>
<p>Than you need to add settings to SqlDataSource to select data from database using SelectCommand. And now you can have data inside of DataGrid.</p>
<p><a href="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image001.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image001_thumb.gif" width="244" height="110" /></a></p>
<p>To make Grid editable you have to define UpdateCommand which in this case contains the name of stored procedure which I am using to update table:</p>
<pre class="brush: sql; gutter: false; toolbar: false;">CREATE OR REPLACE PACKAGE HEATMAP.orm_web_support
AS
   PROCEDURE update_stream_lookup (
      stream_id_     public_stream_lookup.stream_id%TYPE,
      stream_name_   public_stream_lookup.stream_name%TYPE,
      is_visible_    public_stream_lookup.is_visible%TYPE
   );
END orm_web_support;
/ 

CREATE OR REPLACE PACKAGE BODY HEATMAP.orm_web_support
AS
   PROCEDURE update_stream_lookup (
      stream_id_     public_stream_lookup.stream_id%TYPE,
      stream_name_   public_stream_lookup.stream_name%TYPE,
      is_visible_    public_stream_lookup.is_visible%TYPE
   )
   AS
   BEGIN
      UPDATE public_stream_lookup
         SET stream_name = stream_name_,
             is_visible = is_visible_,
             last_modified_date = SYSDATE
       WHERE stream_id = stream_id_;
   END;
END orm_web_support;
/ </pre>
<p>It’s a simple Sql to update table, but I was not able to make page work without stored procedure.</p>
<p>You need to provide parameters for UpdateCommand inside of SqlDataSource:</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8074334941793073";
/* 468x60 baner for inside posts on blog.alexandershapovalov */
google_ad_slot = "8066250748";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;UpdateParameters&gt;
    &lt;asp:Parameter Name=&quot;STREAM_ID&quot; Type=&quot;Int32&quot; /&gt;
    &lt;asp:Parameter Name=&quot;STREAM_NAME&quot; Type=&quot;String&quot; /&gt;
    &lt;asp:Parameter Name=&quot;IS_VISIBLE&quot; Type=&quot;String&quot; /&gt;
&lt;/UpdateParameters&gt; </pre>
<p>Now if you try to run application you will get Exception:</p>
<blockquote>
<p>PLS-00306: wrong number or types of arguments in call to &#8216;UPDATE_STREAM_LOOKUP&#8217;</p>
</blockquote>
<p>To make UpdateCommand work in OnUpdating event for DataSource you have to initialize parameters if you need, or add some parameters, usually it’s username who make changes or something like this. The number and the names of parameters must be the same as in Oracle stored procedure, so you have to add underscore at the and of the parameters.</p>
<p><em>Why do you need to add underscore? The thing is, in UpdateParameter you need to have the same names as in stored procedure, but you can’t change parameter names inside of your SqlDataSource, because they will not be initialized, so you have to change names inside of OnUpdating event. And the easiest way is use underscore for new parameter names.</em></p>
<pre class="brush: csharp; gutter: false; toolbar: false;">protected void SqlStreams_OnUpdating(object sender, SqlDataSourceCommandEventArgs e)
{
    foreach (DbParameter param in e.Command.Parameters)
    {
        param.ParameterName = param.ParameterName + &quot;_&quot;;
    }
} </pre>
<p>And now you can change data in table</p>
<p><a href="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image0015.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001[5]" border="0" alt="clip_image001[5]" src="http://alexandershapovalov.com/blog/wp-content/uploads/2009/07/clip_image0015_thumb.gif" width="566" height="73" /></a></p>
<p>If not all the columns in the table should be editable, for example Id, you have use asp:TemplateField instead of BoundField and Bind method instead of Eval. Why you have to use Bind, <a href="http://alexandershapovalov.com/blog/index.php/2009/07/11/eval-vs-bind-for-asp-net/">read here</a></p>
<p>To delete line from table you have to make the more simple steps as for edit. You need to define DeleteCommand which is simple sql statement. DeleteParameters in this case is not defined, so you have to create new parameter in your c# code and add it to command in OnDeleting event:</p>
<pre class="brush: csharp; gutter: false; toolbar: false;">protected void SqlStreams_OnDeleting(object sender, SqlDataSourceCommandEventArgs e)
{
    int appId;
    if (Int32.TryParse(deleteKey, out appId))
    {
        OracleParameter parameter = new OracleParameter(&quot;STREAM_ID&quot;, appId);
        e.Command.Parameters.Add(parameter);
    }
} </pre>
<p>But before you need to know id of the row to delete. And you can save it in OnRowDeleting event for DataGrid:</p>
<pre class="brush: csharp; gutter: false; toolbar: false;">protected void Grid_OnRowDeleting(object sender, GridViewDeleteEventArgs e)
{
    GridView grid = sender as GridView;
    if (null != grid)
    {
        deleteKey = e.Values[&quot;STREAM_ID&quot;].ToString();
    }
} </pre>
<p>And now it should work, and you will be able to edit rows inside of DataGrid and delete rows from DataGrid.</p>
<p>Below is source code for both .aspx and .cs pages:</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8074334941793073";
/* внутри постов 468x15_4 на blog.alexandershapovalov.com */
google_ad_slot = "0287831794";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: xml; collapse: true;">&lt;%@ Page Title=&quot;&quot; Language=&quot;C#&quot; MasterPageFile=&quot;~/DevKitV5Content.master&quot;
    AutoEventWireup=&quot;true&quot; CodeFile=&quot;PublicStreamsLookup.aspx.cs&quot;
    Inherits=&quot;PublicStreamsLookup&quot; %&gt;
&lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;ContentPlaceHolder1&quot;
    runat=&quot;Server&quot;&gt;
    &lt;asp:SqlDataSource ID=&quot;SqlStreams&quot; runat=&quot;server&quot; SelectCommand=&quot;select STREAM_ID, stream_name, is_visible, last_modified_date from public_stream_lookup order by stream_id desc&quot;
        DeleteCommand=&quot;delete from public_stream_lookup where stream_Id = :Id&quot;
        UpdateCommand=&quot;heatmap.orm_web_support.update_Stream_lookup&quot;
        UpdateCommandType=&quot;StoredProcedure&quot; ProviderName=&quot;System.Data.OracleClient&quot;
        OnUpdating=&quot;SqlStreams_OnUpdating&quot; OnDeleting=&quot;SqlStreams_OnDeleting&quot;&gt;
        &lt;UpdateParameters&gt;
            &lt;asp:Parameter Name=&quot;STREAM_ID&quot; Type=&quot;Int32&quot; /&gt;
            &lt;asp:Parameter Name=&quot;STREAM_NAME&quot; Type=&quot;String&quot; /&gt;
            &lt;asp:Parameter Name=&quot;IS_VISIBLE&quot; Type=&quot;String&quot; /&gt;
        &lt;/UpdateParameters&gt;
        &lt;DeleteParameters&gt;
            &lt;asp:Parameter Name=&quot;STREAM_ID&quot; Type=&quot;Int32&quot; /&gt;
        &lt;/DeleteParameters&gt;
    &lt;/asp:SqlDataSource&gt;
    &lt;div&gt;
        &lt;asp:Label runat=&quot;server&quot; ForeColor=&quot;Red&quot; ID=&quot;LblError&quot;&gt;&lt;/asp:Label&gt;
        &lt;table class=&quot;dataGrid&quot;&gt;
            &lt;tr&gt;
                &lt;th&gt;
                    Stream name
                &lt;/th&gt;
                &lt;th&gt;
                    Visible
                &lt;/th&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;
                    &lt;asp:TextBox ID=&quot;TxtStreamName&quot; runat=&quot;server&quot; CssClass=&quot;selectable&quot;&gt;&lt;/asp:TextBox&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;asp:DropDownList ID=&quot;LstVisible&quot; runat=&quot;server&quot;&gt;
                        &lt;asp:ListItem Text=&quot;Yes&quot; Value=&quot;Y&quot;&gt;&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem Text=&quot;No&quot; Value=&quot;N&quot;&gt;&lt;/asp:ListItem&gt;
                    &lt;/asp:DropDownList&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
        &lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;Add&quot; Style=&quot;float: right;&quot;
            CssClass=&quot;buttonclass&quot; OnClick=&quot;AddButton_OnClick&quot; /&gt;
    &lt;/div&gt;
    &lt;asp:GridView runat=&quot;server&quot; DataSourceID=&quot;SqlStreams&quot; AutoGenerateEditButton=&quot;true&quot;
        CssClass=&quot;dataGrid&quot; GridLines=&quot;None&quot; ID=&quot;GridStreams&quot; AutoGenerateDeleteButton=&quot;true&quot;
        OnRowDeleting=&quot;Grid_OnRowDeleting&quot; AutoGenerateColumns=&quot;false&quot;&gt;
        &lt;AlternatingRowStyle CssClass=&quot;odd&quot; /&gt;
        &lt;Columns&gt;
            &lt;asp:TemplateField HeaderText=&quot;Id&quot;&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label runat=&quot;server&quot; ID=&quot;lblId&quot; Text='&lt;%#Bind(&quot;STREAM_ID&quot;) %&gt;'&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:BoundField HeaderText=&quot;Stream name&quot; DataField=&quot;stream_name&quot; /&gt;
            &lt;asp:BoundField HeaderText=&quot;Visible&quot; DataField=&quot;is_visible&quot; /&gt;
            &lt;asp:TemplateField HeaderText=&quot;Last modified date&quot;&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label runat=&quot;server&quot; ID=&quot;lblDate&quot; Text='&lt;%#Eval(&quot;last_modified_date&quot;, &quot;{0:dd/MM/yyyy}&quot;) %&gt;'&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
        &lt;/Columns&gt;
    &lt;/asp:GridView&gt;
&lt;/asp:Content&gt; </pre>
<pre class="brush: csharp; collapse: true;">using System;
using System.Data.Common;
using System.Data.OracleClient;
using System.Web.UI.WebControls;
using ORM_MS.DAL;
using ORM_MS.Framwork;
public partial class PublicStreamsLookup : PageBase
{
    private string deleteKey;
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        SqlStreams.ConnectionString = Settings.HeatmapConnectionString;
        SqlStreams.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void SqlStreams_OnUpdating(object sender, SqlDataSourceCommandEventArgs e)
    {
        foreach (DbParameter param in e.Command.Parameters)
        {
            param.ParameterName = param.ParameterName + &quot;_&quot;;
        }
    } 

    protected void SqlStreams_OnDeleting(object sender, SqlDataSourceCommandEventArgs e)
    {
        int appId;
        if (Int32.TryParse(deleteKey, out appId))
        {
            OracleParameter parameter = new OracleParameter(&quot;STREAM_ID&quot;, appId);
            e.Command.Parameters.Add(parameter);
        }
    }
    protected void Grid_OnRowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        GridView grid = sender as GridView;
        if (null != grid)
        {
            deleteKey = e.Values[&quot;STREAM_ID&quot;].ToString();
        }
    }
    protected void AddButton_OnClick(object sender, EventArgs e)
    {
        try
        {
            new DbMaintanenceDao().AddInStreams(TxtStreamName.Text,
                                                LstVisible.SelectedValue);
            GridStreams.DataBind();
        }
        catch (Exception ex)
        {
            LblError.Text = &quot;It was an error while adding value. Error id = &quot; + Logger.LogException(ex);
            ;
        }
    }
} </pre>
]]></content:encoded>
			<wfw:commentRss>http://alexandershapovalov.com/blog/2009/07/13/oracle-and-sqldatasource-two-way-data-binding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
