<?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>Winn.ws &#187; VB</title>
	<atom:link href="http://winn.ws/archives/tag/vb/feed" rel="self" type="application/rss+xml" />
	<link>http://winn.ws</link>
	<description>Standards-based design &#38; development</description>
	<lastBuildDate>Sat, 28 Aug 2010 07:22:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple Ajax with .NET</title>
		<link>http://winn.ws/archives/177</link>
		<comments>http://winn.ws/archives/177#comments</comments>
		<pubDate>Tue, 04 Nov 2008 00:15:03 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=177</guid>
		<description><![CDATA[Adding Ajax to an application is simple and easy! Ajax is a powerful tool and can make your application look and feel great!
First let’s start by adding a “Script Manager” to the page, now we only have to add this once so it’s best placed in your Master page. The Script Manager needs to be [...]]]></description>
			<content:encoded><![CDATA[<p>Adding Ajax to an application is simple and easy! Ajax is a powerful tool and can make your application look and feel great!</p>
<p>First let’s start by adding a “Script Manager” to the page, now we only have to add this once so it’s best placed in your Master page. The Script Manager needs to be placed between the form tags on your page like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>form id<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;form1&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ScriptManager ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ScriptManager1&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ScriptManager<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>form<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>After that, we can now add Ajax to an item. Below I have added an “Update Panel” to a list view. Now every action that list view makes will be way of HTTP Requests “Ajax”!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UpdatePanel1&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
        <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListView ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ListView1&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> DataKeyNames<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PostID&quot;</span> 
                DataSourceID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ObjectDataSource1&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
            <span style="color: #008000;">' Your code here...</span>
        <span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListView<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;/</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/177/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web User Controls</title>
		<link>http://winn.ws/archives/173</link>
		<comments>http://winn.ws/archives/173#comments</comments>
		<pubDate>Fri, 24 Oct 2008 03:08:15 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/archives/173</guid>
		<description><![CDATA[Using the user controls may be one of the best moves you will make when developing an application in .NET. The user control will allow you to separate your reusable logic and keep it in one place. For many developers this is a great thing! Many of us have to re-create items over and over, [...]]]></description>
			<content:encoded><![CDATA[<p>Using the user controls may be one of the best moves you will make when developing an application in .NET. The user control will allow you to separate your reusable logic and keep it in one place. For many developers this is a great thing! Many of us have to re-create items over and over, after some time your code can look like crap and then you feel like crap because you have to deal with it.</p>
<p>Let’s say we have a site where I needed a “Quick Search” on every other page, but each page had a different look and feel or a different CSS document. All I would need to do is create a web user control “.ascx” file and lay down the basics of my quick search. Assign the div’s ID’s or classes, then include your control in each page that needs it. To style, just use your style sheet assigned to that page an add your styles.</p>
<p>Web controls make life a little easier when developing in .NET, so be sure to take advantage of this great tool and stop duplicating your work!</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/173/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Select Case in VB</title>
		<link>http://winn.ws/archives/170</link>
		<comments>http://winn.ws/archives/170#comments</comments>
		<pubDate>Sun, 19 Oct 2008 04:07:03 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=170</guid>
		<description><![CDATA[For the few still wondering how to do a Select case in VB here you go! Below is your basic select case in a function returning a true or false boolean.

Public Function CheckStatus(ByVal Status As Boolean) As Boolean
        Select Case Status
        [...]]]></description>
			<content:encoded><![CDATA[<p>For the few still wondering how to do a Select case in VB here you go! Below is your basic select case in a function returning a true or false boolean.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> CheckStatus(<span style="color: #000080;">ByVal</span> Status <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>
        <span style="color: #000080;">Select</span> <span style="color: #000080;">Case</span> Status
            <span style="color: #000080;">Case</span> <span style="color: #000080;">True</span>
                Return <span style="color: #000080;">False</span>
            <span style="color: #000080;">Case</span> <span style="color: #000080;">Else</span>
                Return <span style="color: #000080;">True</span>
        <span style="color: #000080;">End</span> <span style="color: #000080;">Select</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></div></div>

<p>The function is checking for a true or false then returning it back out, based on the case.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/170/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Functions in VB</title>
		<link>http://winn.ws/archives/165</link>
		<comments>http://winn.ws/archives/165#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:22:25 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=165</guid>
		<description><![CDATA[Something that i picked up on was that functions in VB and functions in PHP are a lot alike! This is great news, VB does not have the huge learning curve when stepping in from PHP.
Below i have created a simple function inside if a class:

Public Class Core
    Public Function HelloWorld(AVar)
  [...]]]></description>
			<content:encoded><![CDATA[<p>Something that i picked up on was that functions in VB and functions in PHP are a lot alike! This is great news, VB does not have the huge learning curve when stepping in from PHP.</p>
<p>Below i have created a simple function inside if a class:</p>
<p><code><br />
Public Class Core<br />
    Public Function HelloWorld(AVar)<br />
        Return "Hello " &#038; AVar<br />
    End Function<br />
End Class<br />
</code></p>
<p>Remember, in VB that if you have a function it will need to return a value but a Sub cant return one.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/165/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InsertCommand .NET Date</title>
		<link>http://winn.ws/archives/161</link>
		<comments>http://winn.ws/archives/161#comments</comments>
		<pubDate>Sat, 27 Sep 2008 01:56:44 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=161</guid>
		<description><![CDATA[So, i have been messing with .NET more and more. Just wanted to make a note just in case there is another developer out there looking for this solution. So the problem was i needed to place a date into the database but had no idea. So in the &#8220;asp:SqlDataSource&#8221; i edited the InsertCommand.

InsertCommand="INSERT INTO [...]]]></description>
			<content:encoded><![CDATA[<p>So, i have been messing with .NET more and more. Just wanted to make a note just in case there is another developer out there looking for this solution. So the problem was i needed to place a date into the database but had no idea. So in the &#8220;asp:SqlDataSource&#8221; i edited the InsertCommand.</p>
<p><code><br />
InsertCommand="INSERT INTO [rev1_posts] ([subject], [email], [body], [status], [created_at]) VALUES (@subject, @email, @body, 1, getdate())"<br />
</code></p>
<p>Note i added &#8220;getdate()&#8221; to grab the current date. Simple i know but it took me some time to find the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/161/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching using memcached
Content Delivery Network via Amazon Web Services: CloudFront: dhbbuddo7esu2.cloudfront.net

Served from: winn.ws @ 2010-09-08 23:09:37 -->