<?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>RedSouljaz Blog</title>
	<atom:link href="http://redsouljaz.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://redsouljaz.com</link>
	<description>My Personal Blog&#039;s</description>
	<lastBuildDate>Mon, 25 Apr 2011 09:17:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Collapsible Drag &amp; Drop Panels like Wordpress Dashboard using Jquery and ASP.NET</title>
		<link>http://redsouljaz.com/2011/04/25/collapsible-drag-drop-panels-like-wordpress-dashboard-using-jquery-and-asp-net/</link>
		<comments>http://redsouljaz.com/2011/04/25/collapsible-drag-drop-panels-like-wordpress-dashboard-using-jquery-and-asp-net/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 09:02:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Collapsible Drag & Drop]]></category>
		<category><![CDATA[Collapsible Drag & Drop Panels]]></category>
		<category><![CDATA[Collapsible Drag & Drop Panels like Wordpress]]></category>
		<category><![CDATA[Collapsible Drag & Drop Panels like Wordpress Dashboard using Jquery and ASP.NET]]></category>
		<category><![CDATA[Drag & Drop Panels like Wordpress]]></category>
		<category><![CDATA[Drag & Drop Panels like Wordpress Dashboard using Jquery]]></category>
		<category><![CDATA[jquery Collapsible]]></category>
		<category><![CDATA[Jquery dashboard]]></category>
		<category><![CDATA[save state panel using asp.net]]></category>
		<category><![CDATA[Wordpress Dashboard]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=390</guid>
		<description><![CDATA[I found a great article that teach us how to create drag and drop panel like dashboard in wordpress panel.
In this sites: http://webdeveloperplus.com/jquery/saving-state-for-collapsible-drag-drop-panels/ shows us how to create the drag and drop panel and save the state in PHP and mysql. In this article, I will show the code in ASP.NET using SQL Server 2005.


First, [...]]]></description>
			<content:encoded><![CDATA[<p>I found a great article that teach us how to create drag and drop panel like dashboard in wordpress panel.<br />
In this sites: http://webdeveloperplus.com/jquery/saving-state-for-collapsible-drag-drop-panels/ shows us how to create the drag and drop panel and save the state in PHP and mysql. In this article, I will show the code in ASP.NET using SQL Server 2005.</p>
<p><img src="http://redsouljaz.com/wp-content/uploads/2011/04/4-25-2011-4-15-33-PM.png" alt="4-25-2011 4-15-33 PM" title="4-25-2011 4-15-33 PM" width="559" height="340" class="aligncenter size-full wp-image-393" /><br />
<span id="more-390"></span><br />
First, download jquery at http://jquery.com/<br />
Second, create a testing table name it: widgets</p>
<pre class="brush: vb;">
CREATE TABLE [dbo].[widgets](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[column_id] [int] NULL,
	[sort_no] [int] NULL,
	[collapsed] [int] NULL,
	[title] [varchar](100) NULL
)
</pre>
<p>- id stores the id of panel.<br />
- column_id is the column number to which panel belongs.<br />
- sort_no is the order of panel within column.<br />
- collapsed stores information about whether the panel is collapsed or not.<br />
- title is the title of the widget.</p>
<p>Insert data to widgets as screenshot below:<img src="http://redsouljaz.com/wp-content/uploads/2011/04/4-25-2011-4-24-21-PM.png" alt="4-25-2011 4-24-21 PM" title="4-25-2011 4-24-21 PM" width="292" height="120" class="aligncenter size-full wp-image-391" /></p>
<p>In ASP.NET Project, create xsd file to retrieve and insert data to widgets table and name it as ds_widget.xsd :<br />
<img src="http://redsouljaz.com/wp-content/uploads/2011/04/4-25-2011-4-32-39-PM.png" alt="4-25-2011 4-32-39 PM" title="4-25-2011 4-32-39 PM" width="321" height="224" class="aligncenter size-full wp-image-392" /></p>
<p>In widgetsDetailTableAdapter, use below query:<br />
SELECT * FROM widgets WHERE column_id=@column_id ORDER BY sort_no</p>
<p>for UpdateQuery, use below query:<br />
update widgets set column_id = @column_id, sort_no = @sort_no, collapsed = @collapsed<br />
where id = @widgetid</p>
<p>Create new webpage, add these code</p>
<pre class="brush: vb;">
&lt;%@ Page Language=&quot;VB&quot; AutoEventWireup=&quot;false&quot; CodeFile=&quot;Default.aspx.vb&quot; Inherits=&quot;_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;%@ Import Namespace=&quot;System.Data&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 type=&quot;text/javascript&quot; src=&quot;jquery-1.5.1.min.js&quot;&gt;&lt;/script&gt;
	    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-ui-1.8.11.custom.min.js&quot;&gt;&lt;/script&gt;
       &lt;link href=&quot;dashboard.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
            $(function() {
                $('.dragbox')
	            .each(function() {
	                $(this).hover(function() {
	                    $(this).find('h2').addClass('collapse');
	                }, function() {
	                    $(this).find('h2').removeClass('collapse');
	                })
		            .find('h2').hover(function() {
		                $(this).find('.configure').css('visibility', 'visible');
		            }, function() {
		                $(this).find('.configure').css('visibility', 'hidden');
		            })
		            .click(function() {
		                $(this).siblings('.dragbox-content').toggle();
		                //Save state on change of collapse state of panel
		                updateWidgetData();
		            })
		            .end()
		            .find('.configure').css('visibility', 'hidden');
	            });

                $('.column').sortable({
                    connectWith: '.column',
                    handle: 'h2',
                    cursor: 'move',
                    placeholder: 'placeholder',
                    forcePlaceholderSize: true,
                    opacity: 0.4,
                    start: function(event, ui) {
                        //Firefox, Safari/Chrome fire click event after drag is complete, fix for that
                        if ($.browser.mozilla || $.browser.safari)
                            $(ui.item).find('.dragbox-content').toggle();
                    },
                    stop: function(event, ui) {
                        ui.item.css({ 'top': '0', 'left': '0' }); //Opera fix
                        if (!$.browser.mozilla &amp;&amp; !$.browser.safari)
                            updateWidgetData();
                    }
                })
	            .disableSelection();
                    });

                    function updateWidgetData() {

                        //var items = [];
                        $('.column').each(function() {
                            var columnId = $(this).attr('id');
                            $('.dragbox', this).each(function(i) {
                                var collapsed = 0;
                                if ($(this).find('.dragbox-content').css('display') == &quot;none&quot;)
                                    collapsed = 1;

                                $.post('widgetUpdate.aspx', 'id=' + $(this).attr('id') +
                                '&amp;collapsed=' + collapsed + '&amp;order=' + i + '&amp;column=' + columnId, function(response) {
                                    if (response == &quot;success&quot;)
                                        $(&quot;#console&quot;).html('&lt;div class=&quot;success&quot;&gt;Saved&lt;/div&gt;').hide().fadeIn(1000);
                                    setTimeout(function() {
                                        $('#console').fadeOut(1000);
                                    }, 2000);
                                });
                            });
                        });
                    }

    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;%
        Response.Write(&quot;&lt;uc1:subTitle ID=subTitle2 runat=server /&gt;&quot;)

        'Must set the column manually
        For i As Integer = 1 To 2
            Response.Write(&quot;&lt;div class=column id=column&quot; &amp; i &amp; &quot;&gt;&quot;)
            Dim ds2 As ds_widgetTableAdapters.widgetsDetailTableAdapter = New ds_widgetTableAdapters.widgetsDetailTableAdapter
            Dim dt2 As New DataTable
            Try
                dt2 = ds2.GetData(i)
                For a As Integer = 0 To dt2.Rows.Count - 1
                    Response.Write(&quot;&lt;div class=dragbox id=item&quot; &amp; dt2.Rows(a)(&quot;id&quot;) &amp; &quot;&gt;&quot;)
                    Response.Write(&quot;&lt;h2&gt;&quot; &amp; dt2.Rows(a)(&quot;title&quot;) &amp; &quot;&lt;/h2&gt;&quot;)
                    Response.Write(&quot;&lt;div class=dragbox-content &quot; &amp; IIf(dt2.Rows(a)(&quot;collapsed&quot;) = 1, &quot;style=display:none;&gt;&quot;, &quot;&gt;&quot;))
                    Response.Write(&quot;TESTIS&quot;)
                    Response.Write(&quot;&lt;/div&gt;&quot;)
                    Response.Write(&quot;&lt;/div&gt;&quot;)
                Next
            Catch ex As Exception

            End Try
            Response.Write(&quot;&lt;/div&gt;&quot;)
        Next
            %&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Explanation:<br />
In above code, we use post method that we call from widgetUpdate.aspx to save the state panel into database.<br />
Here is the code for widgetUpdate.aspx (back Code using VB.NET)</p>
<pre class="brush: vb;">
Partial Public Class widgetUpdate
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim id As String = Request.Form(&quot;id&quot;)
        Dim collapsed As String = Request.Form(&quot;collapsed&quot;)
        Dim order As String = Request.Form(&quot;order&quot;)
        Dim column As String = Request.Form(&quot;column&quot;)

        Try
            'Dim products As List(Of widgets) = js.DeserializeObject(Request.Form(&quot;dataItem&quot;))
            Dim qa As ds_widgetTableAdapters.QueriesTableAdapter = New ds_widgetTableAdapters.QueriesTableAdapter
            qa.UpdateQuery(extractNumber(column), order, collapsed, extractNumber(id))
        Catch ex As Exception

        End Try
    End Sub

    Function extractNumber(ByVal expression As String) As Integer
        Dim re As New Regex(&quot;[0-9]&quot;)
        Dim m As Match = re.Match(expression)
        Return m.Value
    End Function
End Class
</pre>
<p>The code is quite simple, we just get all the parameter that was sent from the main page, and save it to database based on the data that we received.<br />
Extract Number function is used to get the number for the id and column no from the string.</p>
<p>For CSS CODE:</p>
<pre class="brush: vb;">
.column{
	width:49%;
	margin-right:.5%;
	min-height:300px;
	background:#fff;
	float:left;
}
.column .dragbox{
	margin:5px 2px  20px;
	background:#fff;
	position:relative;
	border:1px solid #ddd;
	-moz-border-radius:5px;
	-webkit-border-radius:5px;
}
.column .dragbox h2{
	margin:0;
	font-size:12px;
	padding:5px;
	background:#f0f0f0;
	color:#000;
	border-bottom:1px solid #eee;
	font-family:Verdana;
	cursor:move;
}
.dragbox-content{
	background:#fff;
	min-height:100px; margin:5px;
	font-family:'Lucida Grande', Verdana; font-size:0.8em; line-height:1.5em;
}
.column  .placeholder{
	background: #f0f0f0;
	border:1px dashed #ddd;
}
.dragbox h2.collapse{
	background:#f0f0f0 url('images/collapse.png') no-repeat top right;
}
.dragbox h2 .configure{
	font-size:11px; font-weight:normal;
	margin-right:30px; float:right;
}
</pre>
<p>A simpler collapsible drag &#038; drop without can be read at:<br />
http://webdeveloperplus.com/jquery/collpasible-drag-drop-panels/ </p>
<p>Download Sourcecode:<br />
http://www.mediafire.com/?0b0i6jd0p1kszb4</p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2011/04/25/collapsible-drag-drop-panels-like-wordpress-dashboard-using-jquery-and-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.NET &#8211; ASP.NET communication between user control and web page using event handler</title>
		<link>http://redsouljaz.com/2011/04/21/vb-net-asp-net-communication-between-user-control-and-web-page-using-event-handler/</link>
		<comments>http://redsouljaz.com/2011/04/21/vb-net-asp-net-communication-between-user-control-and-web-page-using-event-handler/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 10:09:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ascx]]></category>
		<category><![CDATA[Event Driven Communication]]></category>
		<category><![CDATA[event handler]]></category>
		<category><![CDATA[eventargs]]></category>
		<category><![CDATA[EventHandler]]></category>
		<category><![CDATA[handler]]></category>
		<category><![CDATA[handles]]></category>
		<category><![CDATA[raise event]]></category>
		<category><![CDATA[raiseevent]]></category>
		<category><![CDATA[user control]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[VB.NET - ASP.NET communication between user control and web page using event handler]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=379</guid>
		<description><![CDATA[In this post, we want to show how button in user control communicate with web page in asp.net
First create user control called button.ascx.
Add 3 button, name it btnSave, btnEdit and btnCancel.
in button.ascx back code, add this code:

Public Partial Class button
    Inherits System.Web.UI.UserControl
    Public Event btnSaveHandler As System.EventHandler
   [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, we want to show how button in user control communicate with web page in asp.net</p>
<p>First create user control called button.ascx.</p>
<p>Add 3 button, name it btnSave, btnEdit and btnCancel.</p>
<p>in button.ascx back code, add this code:</p>
<pre class="brush: vb;">
Public Partial Class button
    Inherits System.Web.UI.UserControl
    Public Event btnSaveHandler As System.EventHandler
    Public Event btnEditHandler As System.EventHandler
    Public Event btnCancelHandler As System.EventHandler

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click
        RaiseEvent btnSaveHandler(Me, New EventArgs())
    End Sub

    Protected Sub btnEdit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnEdit.Click
        RaiseEvent btnEditHandler(Me, New EventArgs())
    End Sub

    Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
        RaiseEvent btnCancelHandler(Me, New EventArgs())
    End Sub
End Class
</pre>
<p>In Default.aspx, add 1 label called label1, then drag the button.ascx to the default.aspx.<br />
Add code in default.aspx as below:</p>
<pre class="brush: vb;">
Partial Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Label1.Text = Request.QueryString(&quot;label&quot;)
        AddHandler button1.btnCancelHandler, AddressOf cancelClick
        AddHandler button1.btnEditHandler, AddressOf editClick
        AddHandler button1.btnSaveHandler, AddressOf saveClick
    End Sub

    Private Sub cancelClick(ByVal sender As Object, ByVal e As EventArgs)
        Response.Redirect(&quot;default.aspx?label=Cancel&quot;)
    End Sub

    Private Sub editClick(ByVal sender As Object, ByVal e As EventArgs)
        Response.Redirect(&quot;default.aspx?label=Edit&quot;)
    End Sub

    Private Sub saveClick(ByVal sender As Object, ByVal e As EventArgs)
        Response.Redirect(&quot;default.aspx?label=Save&quot;)
    End Sub
End Class
</pre>
<p>Run it, you will see that button that we create in user control can be manipulate and used in default.aspx<br />
See other example for communication between user control and page in:<br />
http://www.codeproject.com/KB/user-controls/Page_UserControl.aspx</p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2011/04/21/vb-net-asp-net-communication-between-user-control-and-web-page-using-event-handler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Pic Scatter for Facebook Profile</title>
		<link>http://redsouljaz.com/2011/01/08/fun-with-pic-scatter-for-facebook-profile/</link>
		<comments>http://redsouljaz.com/2011/01/08/fun-with-pic-scatter-for-facebook-profile/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 15:06:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Website Review]]></category>
		<category><![CDATA[Website Tips n Trick]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Fun with Pic Scatter for Facebook Profile]]></category>
		<category><![CDATA[Pic Scatter]]></category>
		<category><![CDATA[PicScatter]]></category>
		<category><![CDATA[Profile]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=374</guid>
		<description><![CDATA[Check this cool website tools to make your facebook profile picture more killer. Website: http://picscatter.com/

]]></description>
			<content:encoded><![CDATA[<p>Check this cool website tools to make your facebook profile picture more killer. Website: http://picscatter.com/</p>
<p><img class="aligncenter size-full wp-image-375" title="funfacebook" src="http://redsouljaz.com/wp-content/uploads/2011/01/funfacebook.jpg" alt="funfacebook" width="721" height="595" /></p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2011/01/08/fun-with-pic-scatter-for-facebook-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ILight Marina Bay Singapore</title>
		<link>http://redsouljaz.com/2010/11/08/ilight-marina-bay-singapore/</link>
		<comments>http://redsouljaz.com/2010/11/08/ilight-marina-bay-singapore/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 12:33:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[My Photo Fun]]></category>
		<category><![CDATA[ILight]]></category>
		<category><![CDATA[ILight Marina Bay Singapore]]></category>
		<category><![CDATA[Marina Bay]]></category>
		<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=362</guid>
		<description><![CDATA[Lumenocity Singapore


Digital Origami Tiger

Positive Attracts




My Public Garden

]]></description>
			<content:encoded><![CDATA[<p style="text-align: center; "><strong>Lumenocity Singapore</strong></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Lumenocity Singapore" href="http://redsouljaz.com/myflickr/photo/5157405467/lumenocity-singapore.html"><img class="aligncenter" src="http://farm2.static.flickr.com/1221/5157405467_655dc3d239.jpg" alt="Lumenocity Singapore" width="500" height="333" /></a><strong></strong></p>
<p style="text-align: center; "><span id="more-362"></span></p>
<p style="text-align: center; "><strong>Digital Origami Tiger</strong></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Digital Origami Tiger" href="http://redsouljaz.com/myflickr/photo/5158016642/digital-origami-tiger.html"><img class="aligncenter" src="http://farm2.static.flickr.com/1328/5158016642_909f0ca278.jpg" alt="Digital Origami Tiger" width="500" height="333" /></a></p>
<p style="text-align: center; "><strong>Positive Attracts</strong></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Positive Attracts" href="http://redsouljaz.com/myflickr/photo/5157406303/positive-attracts.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4015/5157406303_3b1c2a5263.jpg" alt="Positive Attracts" width="333" height="500" /></a></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Positive Attracts" href="http://redsouljaz.com/myflickr/photo/5157406061/positive-attracts.html"><img class="aligncenter" src="http://farm2.static.flickr.com/1183/5157406061_c4d9d2b743.jpg" alt="Positive Attracts" width="500" height="333" /></a></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Positive Attracts" href="http://redsouljaz.com/myflickr/photo/5157405779/positive-attracts.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4068/5157405779_225074c527.jpg" alt="Positive Attracts" width="333" height="500" /></a></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Positive Attracts" href="http://redsouljaz.com/myflickr/photo/5157405703/positive-attracts.html"><img class="aligncenter" src="http://farm2.static.flickr.com/1141/5157405703_d5eb7ab974.jpg" alt="Positive Attracts" width="500" height="333" /></a></p>
<p style="text-align: center; "><strong>My Public Garden</strong></p>
<p style="text-align: center; "><a class="tt-flickr tt-flickr-Medium" title="Public Garden" href="http://redsouljaz.com/myflickr/photo/5157406627/public-garden.html"><img class="aligncenter" src="http://farm2.static.flickr.com/1137/5157406627_e51300ed4c.jpg" alt="Public Garden" width="500" height="333" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/11/08/ilight-marina-bay-singapore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Star Cruise Superstar Virgo Trip to Redang</title>
		<link>http://redsouljaz.com/2010/10/03/star-cruise-superstar-virgo-trip-to-redang/</link>
		<comments>http://redsouljaz.com/2010/10/03/star-cruise-superstar-virgo-trip-to-redang/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 08:20:16 +0000</pubDate>
		<dc:creator>pinksouljaz</dc:creator>
				<category><![CDATA[Around The World]]></category>
		<category><![CDATA[Redang]]></category>
		<category><![CDATA[redang beach]]></category>
		<category><![CDATA[star cruise]]></category>
		<category><![CDATA[Star Cruise Superstar Virgo]]></category>
		<category><![CDATA[Star Cruise Superstar Virgo Trip to Redang]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=353</guid>
		<description><![CDATA[


This was my first time took cruise and it was awesome. A nice view from the cruise itself seeing the ocean blue and the beautiful sky although the food they serve is average taste with abundant quantity to fill up your hunger.
They serve breakfast, morning tea, lunch, afternoon tea, dinner and supper. We can choose either [...]]]></description>
			<content:encoded><![CDATA[<p><a class="tt-flickr tt-flickr-Medium" title="redang_Panorama1" href="http://redsouljaz.com/myflickr/photo/5046830194/redang_panorama1.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4133/5046830194_cb28dbf2be.jpg" alt="redang_Panorama1" width="500" height="95" /></a><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_deck3" href="http://redsouljaz.com/myflickr/photo/5045999937/star_cruise_virgo_deck3.html"><br />
<img class="aligncenter" src="http://farm5.static.flickr.com/4144/5045999937_cd2270328f.jpg" alt="star_cruise_virgo_deck3" width="500" height="334" /></a><br />
<span id="more-353"></span><br />
This was my first time took cruise and it was awesome. A nice view from the cruise itself seeing the ocean blue and the beautiful sky although the food they serve is average taste with abundant quantity to fill up your hunger.</p>
<p>They serve breakfast, morning tea, lunch, afternoon tea, dinner and supper. We can choose either chinese, western or international buffet serving.</p>
<p>The cruise staff was nice, they were friendly. They have tons of activities from kids to family. I had enjoyed the activities for the family.</p>
<p>The second day, we arrive at pulau redang which is our destination we only stop there for 6 hours. So, after lunch we went to that small island took a ferry from the cruise. When we get there, when we saw the beach.. wow beautiful.. its very nice, the fine sands, the sea&#8230; it is beautiful..</p>
<p>When we get there, my husband forgotten to bring ringgit malaysia which that we had prepared. We are lucky there were money changer at the resort lobby. So before we took off from the beach we enjoy 2 cold coconut&#8230; it was very nice to have coconut in such a hot weather</p>
<p>We decided to took off earlier  to avoid long queue as wee need to take ferry to get back to the cruise..</p>
<p>We were exhausted that night, but we still watch one more show after dinner. Then we get back to our cabin to pack up our stuff as the third day we have to disembark from the cruise.</p>
<p>By: PinkSouljaz</p>
<p><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_deck2" href="http://redsouljaz.com/myflickr/photo/5046622390/star_cruise_virgo_deck2.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4145/5046622390_c110960026.jpg" alt="star_cruise_virgo_deck2" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_deck" href="http://redsouljaz.com/myflickr/photo/5046622200/star_cruise_virgo_deck.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4107/5046622200_1c9242a2be.jpg" alt="star_cruise_virgo_deck" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_swimming_pool2" href="http://redsouljaz.com/myflickr/photo/5045999345/star_cruise_virgo_swimming_pool2.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4090/5045999345_1c17baf26c.jpg" alt="star_cruise_virgo_swimming_pool2" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_swimming_pool" href="http://redsouljaz.com/myflickr/photo/5045999161/star_cruise_virgo_swimming_pool.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4148/5045999161_21d75fbe93.jpg" alt="star_cruise_virgo_swimming_pool" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="star_cruise_virgo_side_deck" href="http://redsouljaz.com/myflickr/photo/5046000127/star_cruise_virgo_side_deck.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4126/5046000127_3e2c37b9e9.jpg" alt="star_cruise_virgo_side_deck" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="redang_beach2" href="http://redsouljaz.com/myflickr/photo/5045998975/redang_beach2.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4126/5045998975_7437f419b3.jpg" alt="redang_beach2" width="500" height="334" /></a><a class="tt-flickr tt-flickr-Medium" title="redang_beach" href="http://redsouljaz.com/myflickr/photo/5046621510/redang_beach.html"><img class="aligncenter" src="http://farm5.static.flickr.com/4105/5046621510_7eb10b0c18.jpg" alt="redang_beach" width="500" height="334" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/10/03/star-cruise-superstar-virgo-trip-to-redang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET &#8211; GridView &#8211; Get Hidden Field Value in RowCommand</title>
		<link>http://redsouljaz.com/2010/09/21/asp-net-gridview-get-hidden-field-value-in-rowcommand/</link>
		<comments>http://redsouljaz.com/2010/09/21/asp-net-gridview-get-hidden-field-value-in-rowcommand/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 10:12:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[ASP.NET - GridView - Get Hidden Field Value in RowCommand]]></category>
		<category><![CDATA[Get Hidden Field Value]]></category>
		<category><![CDATA[Get Hidden Field Value in RowCommand]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[RowCommand]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=346</guid>
		<description><![CDATA[There is a problem when we set BoundField visibility to false, the column isn&#8217;t rendered to the client. A work around would be to use a HiddenField within a TemplateField instead.

&#60;asp:TemplateField HeaderText=&#34;MemberID&#34;&#62;
    &#60;ItemTemplate&#62;
        &#60;asp:LinkButton ID=&#34;lbtn_memberid&#34; runat=&#34;server&#34; CommandName=&#34;GetMemberID&#34; CommandArgument='&#60;%# DataBinder.Eval(Container, &#34;DataItem.memberid&#34;) %&#62;'
     [...]]]></description>
			<content:encoded><![CDATA[<p>There is a problem when we set BoundField visibility to false, the column isn&#8217;t rendered to the client. A work around would be to use a HiddenField within a TemplateField instead.</p>
<pre class="brush: vb;">
&lt;asp:TemplateField HeaderText=&quot;MemberID&quot;&gt;
    &lt;ItemTemplate&gt;
        &lt;asp:LinkButton ID=&quot;lbtn_memberid&quot; runat=&quot;server&quot; CommandName=&quot;GetMemberID&quot; CommandArgument='&lt;%# DataBinder.Eval(Container, &quot;DataItem.memberid&quot;) %&gt;'
            Text='&lt;%# DataBinder.Eval(Container, &quot;DataItem.memberid&quot;) %&gt;'&gt;&lt;/asp:LinkButton&gt;
    &lt;/ItemTemplate&gt;
&lt;/asp:TemplateField&gt;

&lt;asp:TemplateField&gt;
    &lt;ItemTemplate&gt;
        &lt;asp:HiddenField ID=&quot;fieldid&quot; runat=&quot;server&quot; Value='&lt;%# Eval(&quot;fieldname&quot;) %&gt;' /&gt;
    &lt;/ItemTemplate&gt;
&lt;/asp:TemplateField&gt;
</pre>
<p>Back Code:</p>
<pre class="brush: vb;">
    Protected Sub gridview1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gridview1.RowCommand

        If e.CommandName = &quot;GetMemberID&quot; Then

            Session(&quot;GetMemberID&quot;) = e.CommandArgument.ToString()

            Dim gv As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).NamingContainer, GridViewRow)

            Dim i As Integer = gv.RowIndex

            Dim row As GridViewRow = gridview1.Rows(i)

            Dim hidden As HiddenField = DirectCast(row.Cells(0).FindControl(&quot;fieldid&quot;), HiddenField)

            Dim fieldid As Integer = CInt(hidden.Value)

        End If

    End Sub
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/09/21/asp-net-gridview-get-hidden-field-value-in-rowcommand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ask for username and password when calling reporting service</title>
		<link>http://redsouljaz.com/2010/06/22/ask-for-username-and-password-when-calling-reporting-service/</link>
		<comments>http://redsouljaz.com/2010/06/22/ask-for-username-and-password-when-calling-reporting-service/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 03:42:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[Ask for username and password]]></category>
		<category><![CDATA[Ask for username and password when calling reporting service]]></category>
		<category><![CDATA[GetFormsCredentials]]></category>
		<category><![CDATA[how to set credentials for reporting services]]></category>
		<category><![CDATA[keep asking for username and password when calling reporting services]]></category>
		<category><![CDATA[NetworkCredentials]]></category>
		<category><![CDATA[pop up authentication when calling reporting service]]></category>
		<category><![CDATA[reporting service]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=335</guid>
		<description><![CDATA[These code allow us to set username and password for reporting services to avoid popup request authentication.
This code tested in Visual Studio 2008 and Reporting Services from SQL Server 2005
First create a class called ReportServerCredentials.vb

Imports Microsoft.VisualBasic
Imports Microsoft.Reporting.WebForms
Imports System.Security.Principal

Public NotInheritable Class ReportServerCredentials
    Implements IReportServerCredentials

    Public ReadOnly Property ImpersonationUser() As WindowsIdentity [...]]]></description>
			<content:encoded><![CDATA[<p>These code allow us to set username and password for reporting services to avoid popup request authentication.</p>
<p>This code tested in Visual Studio 2008 and Reporting Services from SQL Server 2005</p>
<p>First create a class called ReportServerCredentials.vb</p>
<pre class="brush: vb;">
Imports Microsoft.VisualBasic
Imports Microsoft.Reporting.WebForms
Imports System.Security.Principal

Public NotInheritable Class ReportServerCredentials
    Implements IReportServerCredentials

    Public ReadOnly Property ImpersonationUser() As WindowsIdentity _
            Implements IReportServerCredentials.ImpersonationUser
        Get

            'Use the default windows user.  Credentials will be
            'provided by the NetworkCredentials property.
            Return Nothing

        End Get
    End Property

    Public ReadOnly Property NetworkCredentials() As Net.ICredentials _
            Implements IReportServerCredentials.NetworkCredentials
        Get

            'Read the user information from the web.config file.
            'By reading the information on demand instead of storing
            'it, the credentials will not be stored in session,
            'reducing the vulnerable surface area to the web.config
            'file, which can be secured with an ACL.

            'User name
            Dim userName As String = _
                ConfigurationManager.AppSettings(&quot;UserName&quot;)

            If (String.IsNullOrEmpty(userName)) Then
                Throw New Exception(&quot;Missing user name from web.config file&quot;)
            End If

            'Password
            Dim password As String = _
                ConfigurationManager.AppSettings(&quot;Password&quot;)

            If (String.IsNullOrEmpty(password)) Then
                Throw New Exception(&quot;Missing password from web.config file&quot;)
            End If

            'Domain
            Dim domain As String = _
                ConfigurationManager.AppSettings(&quot;SERVERNAME&quot;)

            If (String.IsNullOrEmpty(domain)) Then
                Throw New Exception(&quot;Missing domain from web.config file&quot;)
            End If

            Return New Net.NetworkCredential(userName, password, domain)

        End Get
    End Property

    Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, _
                                        ByRef userName As String, _
                                        ByRef password As String, _
                                        ByRef authority As String) _
                                        As Boolean _
            Implements IReportServerCredentials.GetFormsCredentials

        authCookie = Nothing
        userName = Nothing
        password = Nothing
        authority = Nothing

        'Not using form credentials
        Return False

    End Function

End Class 
</pre>
<p>Second, add parameter key to your web.config</p>
<pre class="brush: vb;">
&lt;appSettings&gt;
&lt;add key=&quot;UserName&quot; value=&quot;UserName&quot;/&gt;
		&lt;add key=&quot;Password&quot; value=&quot;Password&quot;/&gt;
		&lt;add key=&quot;SERVERNAME&quot; value=&quot;SERVERNAME&quot;/&gt;
&lt;/appSettings&gt;
</pre>
<p>And then add this line of code before calling reportserverURL in the report view page:</p>
<pre class="brush: vb;">
ReportViewer1.ServerReport.ReportServerCredentials = New ReportServerCredentials()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/06/22/ask-for-username-and-password-when-calling-reporting-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Send Email with multiple attachments from VB.NET</title>
		<link>http://redsouljaz.com/2010/06/03/send-email-with-multiple-attachments-from-vb-net/</link>
		<comments>http://redsouljaz.com/2010/06/03/send-email-with-multiple-attachments-from-vb-net/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 09:43:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[MailMessage]]></category>
		<category><![CDATA[Send Email from VB.NET]]></category>
		<category><![CDATA[Send Email with attachments from VB.NET]]></category>
		<category><![CDATA[Send Email with multiple attachments from VB.NET]]></category>
		<category><![CDATA[System.Net.Mail]]></category>
		<category><![CDATA[System.Net.Mail.Attachment]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=328</guid>
		<description><![CDATA[This code show how to send email multiple attachments from vb.net by using System.Net.Mail
1. This is how you use it

Dim fileAttch = New ArrayList
fileAttch.Add(&#34;C:\test.csv&#34;)
fileAttch.Add(&#34;C:\test2.csv&#34;)
fileAttch.Add(&#34;C:\test3.csv&#34;)

sendEmail.send(your_emailHost, &#34;no-reply@company.com&#34;, your_EmailTo, your_EmailSubject, your_EmailBody, your_EmailccTo, fileAttch)


2. Create a class called sendEmail.vb

Imports System.IO
Imports System.Net.Mail
Imports Microsoft.VisualBasic
Imports System

Public Class sendEmail

    Public Shared Sub send(ByVal smtpHost As String, ByVal fromEmail As String, [...]]]></description>
			<content:encoded><![CDATA[<p>This code show how to send email multiple attachments from vb.net by using System.Net.Mail</p>
<p>1. This is how you use it</p>
<pre class="brush: vb;">
Dim fileAttch = New ArrayList
fileAttch.Add(&quot;C:\test.csv&quot;)
fileAttch.Add(&quot;C:\test2.csv&quot;)
fileAttch.Add(&quot;C:\test3.csv&quot;)

sendEmail.send(your_emailHost, &quot;no-reply@company.com&quot;, your_EmailTo, your_EmailSubject, your_EmailBody, your_EmailccTo, fileAttch)
</pre>
<p><span id="more-328"></span></p>
<p>2. Create a class called sendEmail.vb</p>
<pre class="brush: vb;">
Imports System.IO
Imports System.Net.Mail
Imports Microsoft.VisualBasic
Imports System

Public Class sendEmail

    Public Shared Sub send(ByVal smtpHost As String, ByVal fromEmail As String, ByVal toEmail As String, ByVal subject As String, ByVal body As String, ByVal cc As String, Optional ByVal AttachmentFiles As ArrayList = Nothing)
        Dim mail As New MailMessage()

        '-----------------------------------
        'Set Email Address
        '-----------------------------------
        mail.From = New MailAddress(fromEmail)

        If toEmail = &quot;&quot; Then
            Throw New Exception(&quot;Error: No email address to send&quot;)
        End If
        If toEmail.Contains(&quot;;&quot;) Then
            Dim emailList As String()
            emailList = toEmail.Split(&quot;;&quot;)
            For Each email As String In emailList
                mail.To.Add(email)
            Next
        Else
            mail.To.Add(toEmail)
        End If
        If cc &lt;&gt; &quot;&quot; Then
            If cc.Contains(&quot;;&quot;) Then
                Dim ccList As String()
                ccList = cc.Split(&quot;;&quot;)
                For Each ccTo As String In ccList
                    mail.CC.Add(ccTo)
                Next
            Else
                mail.CC.Add(cc)
            End If
        End If

        '-----------------------------------
        'Set Email Address Content
        '-----------------------------------
        mail.Subject = subject
        mail.IsBodyHtml = True
        mail.Body = body

        Dim i As Integer
        Dim Attachment As System.Net.Mail.Attachment

        For i = 0 To AttachmentFiles.Count - 1
            If FileExists(AttachmentFiles(i)) Then
                Attachment = New Net.Mail.Attachment(AttachmentFiles(i))
                mail.Attachments.Add(Attachment)
            End If
        Next

        '-----------------------------------
        'Set Email Address Host
        '-----------------------------------
        Dim smtp As New SmtpClient(smtpHost)
        Try
            smtp.Send(mail)
        Catch ex As Exception
            '-------------------------------------------------
            MsgBox(&quot;Error &quot; &amp; ex.Message)
            '-------------------------------------------------
        End Try

    End Sub

    Private Shared Function FileExists(ByVal FileFullPath As String) As Boolean
        If Trim(FileFullPath) = &quot;&quot; Then Return False

        Dim f As New IO.FileInfo(FileFullPath)
        Return f.Exists

    End Function

End Class
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/06/03/send-email-with-multiple-attachments-from-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get first day of the month and last day of the month in VB.NET</title>
		<link>http://redsouljaz.com/2010/06/03/get-first-day-of-the-month-and-last-day-of-the-month-in-vb-net/</link>
		<comments>http://redsouljaz.com/2010/06/03/get-first-day-of-the-month-and-last-day-of-the-month-in-vb-net/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 09:31:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Finding the first and last day of the month]]></category>
		<category><![CDATA[first day of the month]]></category>
		<category><![CDATA[Get first day of the month and last day of the month in VB.NET]]></category>
		<category><![CDATA[last day of the month]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=325</guid>
		<description><![CDATA[This code show how to get first date of the month and last day of the month date.

Private Function GetFirstDayOfMonth(ByVal dtDate As DateTime) As DateTime
        Dim dtFrom As DateTime = dtDate
        dtFrom = dtFrom.AddDays(-(dtFrom.Day - 1))
      [...]]]></description>
			<content:encoded><![CDATA[<p>This code show how to get first date of the month and last day of the month date.</p>
<pre class="brush: vb;">
Private Function GetFirstDayOfMonth(ByVal dtDate As DateTime) As DateTime
        Dim dtFrom As DateTime = dtDate
        dtFrom = dtFrom.AddDays(-(dtFrom.Day - 1))
        Return dtFrom
    End Function

    Private Function GetLastDayOfMonth(ByVal dtDate As DateTime) As DateTime
        Dim dtTo As New DateTime(dtDate.Year, dtDate.Month, 1)
        dtTo = dtTo.AddMonths(1)
        dtTo = dtTo.AddDays(-(dtTo.Day))
        Return dtTo
    End Function

'if you put code like:
GetFirstDayOfMonth(&quot;2010-05-05&quot;) ' It will return = 2010-05-01
GetLastDayOfMonth(&quot;2010-05-05&quot;) ' It will return = 2010-05-31
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/06/03/get-first-day-of-the-month-and-last-day-of-the-month-in-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.NET Set Data Table to CSV File</title>
		<link>http://redsouljaz.com/2010/06/03/vb-net-set-data-table-to-csv-file/</link>
		<comments>http://redsouljaz.com/2010/06/03/vb-net-set-data-table-to-csv-file/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 09:22:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Data Table to CSV]]></category>
		<category><![CDATA[datatable 2 csv]]></category>
		<category><![CDATA[DataTable to CSV]]></category>
		<category><![CDATA[Set Data Table to CSV File]]></category>
		<category><![CDATA[VB.NET Set Data Table to CSV File]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=323</guid>
		<description><![CDATA[This function show how to Convert DataTable to CSV File 

    Sub SetDataTable_To_CSV(ByVal dtable As DataTable, ByVal path_filename As String, ByVal sep_char As String)
        Dim writer As System.IO.StreamWriter
        Try
          [...]]]></description>
			<content:encoded><![CDATA[<p>This function show how to Convert DataTable to CSV File </p>
<pre class="brush: vb;">
    Sub SetDataTable_To_CSV(ByVal dtable As DataTable, ByVal path_filename As String, ByVal sep_char As String)
        Dim writer As System.IO.StreamWriter
        Try
            writer = New System.IO.StreamWriter(path_filename)

            Dim _sep As String = &quot;&quot;
            Dim builder As New System.Text.StringBuilder
            For Each col As DataColumn In dtable.Columns
                builder.Append(_sep).Append(col.ColumnName)
                _sep = sep_char
            Next
            writer.WriteLine(builder.ToString())

            For Each row As DataRow In dtable.Rows
                _sep = &quot;&quot;
                builder = New System.Text.StringBuilder

                For Each col As DataColumn In dtable.Columns
                    builder.Append(_sep).Append(row(col.ColumnName))
                    _sep = sep_char
                Next
                writer.WriteLine(builder.ToString())
            Next
        Catch ex As Exception

        Finally
            If Not writer Is Nothing Then writer.Close()
        End Try
    End Sub
</pre>
<p>This is how you use it</p>
<pre class="brush: vb;">
Dim dt As New DataTable
SetDataTable_To_CSV(dt, &quot;C:\test.csv&quot;, &quot;,&quot;)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/06/03/vb-net-set-data-table-to-csv-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

