<?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>oue&#039;s profile &#187; asp.net</title>
	<atom:link href="http://www.aspgod.com/tag/asp-net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.aspgod.com</link>
	<description>AI algorithm graphics programming blog Firefox ff</description>
	<lastBuildDate>Fri, 20 Jan 2012 16:59:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Pointer in C# (.NET) and why .NET not allow to use as safe</title>
		<link>http://www.aspgod.com/aspnet/pointer-in-c-net-and-why-net-not-allow-to-use-as-safe.html</link>
		<comments>http://www.aspgod.com/aspnet/pointer-in-c-net-and-why-net-not-allow-to-use-as-safe.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 07:50:55 +0000</pubDate>
		<dc:creator>aspgod</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[pointer]]></category>
		<category><![CDATA[pointer in C#]]></category>
		<category><![CDATA[pointer in VB]]></category>
		<category><![CDATA[unsafe]]></category>

		<guid isPermaLink="false">http://www.aspgod.com/myprofile/?p=257</guid>
		<description><![CDATA[I tried to use pointer in C# because I use to do the same in C++. But I cann&#8217;t do this in .NET (C#) cause the pointer is unsafe with every reason. 1. Pointer can point to every address. 2. If you cann&#8217;t control the pointer well as &#8220;Memory Leak&#8221; then you will get the [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I tried to use pointer in C# because I use to do the same in C++. But I cann&#8217;t do this in .NET (C#) cause the pointer is unsafe with every reason.<br />
1. Pointer can point to every address.<br />
2. If you cann&#8217;t control the pointer well as &#8220;Memory Leak&#8221; then you will get the memory problem.<br />
3. You will get the error If you destry one object and there were some pointer still point to that object. That pointer will point to null.</p>
<p>The problem above show the unsafe of pointer then .Net not allow to use it. Because of most reason to use pointer will use for the low level programming. So C++ or VB6 will be better to use it. <img src='http://www.aspgod.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I have searched the google and found one reference site that explain why you cann&#8217;t use pointer in .NET. This article is awsome. Let&#8217;s see this reference : <a href="http://www.dotnetspider.com/resources/313-Pointers-C-writing-Unsafe-code.aspx" target="_blank">unsafe .NET pointer</a></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.aspgod.com/aspnet/pointer-in-c-net-and-why-net-not-allow-to-use-as-safe.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get root path, root url and any url of your website asp.net</title>
		<link>http://www.aspgod.com/aspnet/252.html</link>
		<comments>http://www.aspgod.com/aspnet/252.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 04:40:35 +0000</pubDate>
		<dc:creator>aspgod</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[root path]]></category>
		<category><![CDATA[root url]]></category>
		<category><![CDATA[Server.MapPath]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.aspgod.com/myprofile/?p=252</guid>
		<description><![CDATA[This technique will help you to get url and path of server that you want. Let&#8217;s see this result. When I place this script on this path below : http://www.aspgod.com/test/mappath/Default.aspx And the script is : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Request.Url.AbsoluteUri // http://www.aspgod.com/test/mappath/Default.aspx Request.Url.AbsolutePath // /test/mappath/Default.aspx [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This technique will help you to get url and path of server that you want.<br />
Let&#8217;s see this result.</p>
<p>When I place this script on this path below :</p>
<p>http://www.aspgod.com/test/mappath/Default.aspx</p>
<p>And the script is :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsoluteUri</span>  <span style="color: #008080; font-style: italic;">//  http://www.aspgod.com/test/mappath/Default.aspx</span>
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsolutePath</span>  <span style="color: #008080; font-style: italic;">//  /test/mappath/Default.aspx</span>
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span>  <span style="color: #008080; font-style: italic;">//  because I'm not set the virsual directory indeep of the server</span>
&nbsp;
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008080; font-style: italic;">// d:\xxx\zzz\aspgod.com\httpdocs\test\mapath</span>
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Default.aspx&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008080; font-style: italic;">// d:\xxx\zzz\aspgod.com\httpdocs\test\mapath\Default.aspx</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">if</span> you want to get the root path and root url<span style="color: #008000;">.</span>
<span style="color: #0000FF;">You</span> must enter <span style="color: #0600FF; font-weight: bold;">this</span> script below<span style="color: #008000;">:</span>
&nbsp;
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsoluteUri</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span>Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsolutePath</span>,<span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> Request<span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span>
<span style="color: #008080; font-style: italic;">//  www.aspgod.com/</span>
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Request</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;/&quot;</span>, <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\\</span>&quot;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">-&amp;</span>gt<span style="color: #008000;">;</span> d<span style="color: #008000;">:</span>\xxx\zzz\aspgod<span style="color: #008000;">.</span><span style="color: #0000FF;">com</span>\httpdocs</pre></td></tr></table></div>

<p>&#8212;&#8211;</p>
<p>If I use this script on localhost the the result is :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsoluteUri</span>  <span style="color: #008080; font-style: italic;">//  http://localhost:1904/aspgod/test/mappath/Default.aspx</span>
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsolutePath</span>  <span style="color: #008080; font-style: italic;">//  /test/mappath/Default.aspx</span>
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span>  <span style="color: #008080; font-style: italic;">//  /aspgod</span>
&nbsp;
my project <span style="color: #008000;">is</span> <span style="color: #0600FF; font-weight: bold;">in</span> <span style="color: #0600FF; font-weight: bold;">this</span> path E<span style="color: #008000;">:</span>\<span style="color: #008000;">---</span> Other Project <span style="color: #008000;">---</span>\aspgod\program\aspgod
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008080; font-style: italic;">// E:\--- Other Project ---\aspgod\program\aspgod\test\mapath</span>
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Default.aspx&quot;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008080; font-style: italic;">// E:\--- Other Project ---\aspgod\program\aspgod\test\mapath\Default.aspx</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">if</span> you want to get the root path and root url<span style="color: #008000;">.</span>
<span style="color: #0000FF;">You</span> must enter <span style="color: #0600FF; font-weight: bold;">this</span> script below<span style="color: #008000;">:</span>
&nbsp;
Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsoluteUri</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span>Request<span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsolutePath</span>,<span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> Request<span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span>
<span style="color: #008080; font-style: italic;">//  http://localhost:1904/aspgod</span>
Server<span style="color: #008000;">.</span><span style="color: #0000FF;">MapPath</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Request</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ApplicationPath</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;/&quot;</span>, <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\\</span>&quot;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008080; font-style: italic;">// E:\--- Other Project ---\aspgod\program\aspgod</span></pre></td></tr></table></div>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.aspgod.com/aspnet/252.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>GridView RowDataBound Get DataSource By Row</title>
		<link>http://www.aspgod.com/aspnet/gridview-rowdatabound-get-datasource-by-row.html</link>
		<comments>http://www.aspgod.com/aspnet/gridview-rowdatabound-get-datasource-by-row.html#comments</comments>
		<pubDate>Wed, 08 Jul 2009 03:41:22 +0000</pubDate>
		<dc:creator>aspgod</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[datasource]]></category>
		<category><![CDATA[Eval]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[RowDataBound]]></category>

		<guid isPermaLink="false">http://www.aspgod.com/myprofile/?p=250</guid>
		<description><![CDATA[When using RowDataBound (the GridView&#8217;s method) and want to get the data by row. Because RowDataBound work on row by row when initial GridView. How to get data from datasource in method RowDataBound ? Use Eval() method will help you protected void gvView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { _SumTotal += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>When using RowDataBound (the GridView&#8217;s method) and want to get the data by row. Because RowDataBound work on row by row when initial GridView. How to get data from datasource in method RowDataBound ? Use Eval() method will help you</p>
<blockquote><p>
    protected void gvView_RowDataBound(object sender, GridViewRowEventArgs e)<br />
    {<br />
        if (e.Row.RowType == DataControlRowType.DataRow)<br />
        {<br />
            _SumTotal += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, &#8220;Total&#8221;));<br />
        }<br />
    }</p>
<p>// &#8220;Total&#8221; is a data field in database<br />
// _SumTotal is a global valuable on this page
</p></blockquote>
<p>In this example you can get all total summary in gridview datasource.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.aspgod.com/aspnet/gridview-rowdatabound-get-datasource-by-row.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

