<?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>Thuan V. Nguyen &#187; ASP.net 1.1</title>
	<atom:link href="http://www.a8le.com/category/aspnet-11/feed" rel="self" type="application/rss+xml" />
	<link>http://www.a8le.com</link>
	<description>236th Birthday Marines!</description>
	<lastBuildDate>Sun, 15 May 2011 03:51:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Batch BOL/EOL Editing</title>
		<link>http://www.a8le.com/batch-boleol-editing</link>
		<comments>http://www.a8le.com/batch-boleol-editing#comments</comments>
		<pubDate>Fri, 04 Apr 2008 14:22:09 +0000</pubDate>
		<dc:creator>a8le</dc:creator>
				<category><![CDATA[ASP.net 1.1]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[every]]></category>
		<category><![CDATA[line]]></category>

		<guid isPermaLink="false">http://www.a8le.com/archives/44</guid>
		<description><![CDATA[I needed a way of adding periods to the end of every line in text documents. The text documents in question had 100+ lines, so going through each document and pressing ( END &#62; . &#62; ENTER ) repetitively was not ideal. I needed a program, but after some brief googling I gave up and [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way of adding periods to the end of every line in text documents.  The text documents in question had 100+ lines, so going through each document and pressing ( END &gt; . &gt; ENTER ) repetitively was not ideal.  I needed a program, but after some brief googling I gave up and decided that I needed to write this program.  I started my project by getting some advice and direction, <a href="http://www.vbdotnetforums.com/showthread.php?p=78217#post78217" target="_blank">here</a>, and I am glad I did or else I would have went with my original plan of working with &#8220;regex&#8221; <img src='http://www.a8le.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  &#8230;</p>
<blockquote><p><strike>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim oFile As System.IO.File<br />
Dim oWrite As System.IO.StreamWriter<br />
Dim Needy As String = tbx_main.Text<br />
Dim Added As String = Regex.Replace(Needy, &#8220;(\p{P})(?=\Z|\r\n)&#8221;, &#8220;.&#8221;)<br />
oWrite.Write(Added)<br />
oWrite.Close()<br />
oWrite = oFile.CreateText(&#8220;C:\Text_to_Speech.txt&#8221;)<br />
End Sub</strike></p></blockquote>
<p>The end result is a little program that adds any desired character(s) to the beginning or end of all lines pasted into its textbox.  The code is as follows&#8230;</p>
<blockquote><p>Try<br />
&#8216;Make sure big tbx is not empty<br />
If tbx_main.Text = &#8220;&#8221; Then<br />
tbx_main.Text = &#8220;Please enter text!&#8221;<br />
ElseIf tbx_main.Text = &#8220;Please enter text!&#8221; Then<br />
tbx_main.Text = &#8220;Please enter text!&#8221;<br />
Else<br />
&#8216;Make sure small tbx is not empty<br />
If tbx_desired.Text = &#8220;&#8221; Then<br />
tbx_desired.Text = &#8220;Char?&#8221;<br />
ElseIf tbx_desired.Text = &#8220;Char?&#8221; Then<br />
tbx_desired.Text = &#8220;Char?&#8221;<br />
Else<br />
&#8216;Declare: file, stream and savefiledialog<br />
Dim oFile As File<br />
Dim oMyStream As Stream<br />
Dim saveFileDialog1 As New SaveFileDialog<br />
&#8216;Set savefiledialog defaults<br />
saveFileDialog1.Filter = &#8220;txt files (*.txt)|*.txt&#8221;<br />
saveFileDialog1.FilterIndex = 2<br />
saveFileDialog1.RestoreDirectory = True<br />
&#8216;Run nested code if user presses OK button in dialog<br />
If saveFileDialog1.ShowDialog() = DialogResult.OK Then<br />
oMyStream = saveFileDialog1.OpenFile()<br />
Dim oWrite As New StreamWriter(oMyStream)<br />
For Each LineInput As String In tbx_main.Lines<br />
&#8216;Core Code, add periods to beginning or end<br />
If rbtn_begin.Checked = True Then<br />
&#8216;Beginning<br />
oWrite.WriteLine(tbx_desired.Text + LineInput)<br />
ElseIf rbtn_end.Checked = True Then<br />
&#8216;End<br />
oWrite.WriteLine(LineInput + tbx_desired.Text)<br />
End If<br />
Next<br />
oWrite.Close()<br />
End If<br />
&#8216;Periods added, display success msgbx, close form<br />
MessageBox.Show(&#8220;Success: file was created!&#8221;)<br />
Me.Dispose()<br />
Me.Close()<br />
End If<br />
End If<br />
Catch exc As Exception<br />
&#8216;Catch Errors, display messagebox<br />
MessageBox.Show(&#8220;Error: file was not created!&#8221;)<br />
End Try</p></blockquote>
<p>Sounds useful? If you want to download the program and use it at your own risk, <a href="http://www.a8le.com/wp-content/uploads/2008/04/periods.zip" title="Period.exe, Batch BOL/EOL Editing">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a8le.com/batch-boleol-editing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.net 1.1 Repeater Columns</title>
		<link>http://www.a8le.com/35</link>
		<comments>http://www.a8le.com/35#comments</comments>
		<pubDate>Tue, 13 Nov 2007 16:52:43 +0000</pubDate>
		<dc:creator>a8le</dc:creator>
				<category><![CDATA[ASP.net 1.1]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Dotnetnuke]]></category>

		<guid isPermaLink="false">http://www.a8le.com/archives/35</guid>
		<description><![CDATA[While writing a script to mass approve posts on a site, similar to deleting all unwanted email using: a repeater (not a datagrid), a checkbox in each indexItem, and a button; I ran into a common problem for many&#8230; ASP.net repeaters don&#8217;t have columns. I searched the net and visited two of my favorite forums [...]]]></description>
			<content:encoded><![CDATA[<p>While writing a script to mass approve posts on a site, similar to deleting all unwanted email using: a repeater (not a datagrid), a checkbox in each indexItem, and a button; I ran into a common problem for many&#8230; ASP.net repeaters don&#8217;t have columns. I searched the net and visited two of my favorite forums looking for help and came up with nothing&#8230;</p>
<p>Here&#8217;s my Psuedo/Logic:<br />
1) Load Repeater with list of &#8220;UNmoderated&#8221; items<br />
2) Put a checkbox inside the repeaters ItemTemplate<br />
3) Add code to button (dosomething if checkbox is checked)</p>
<p><strong>Problem:</strong><br />
I couldn&#8217;t locate the column with the PrimaryUniqueID because there are no columns in repeaters, but my Stored Procedure &#8220;requires&#8221; the PrimaryUniqueID.</p>
<blockquote><p> <u>Button code:</u><br />
Private Sub MassApprove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MassApprove.Click<br />
Try<br />
Dim MyRptItem As RepeaterItem<br />
For Each MyRptItem In MyRepeater.Items<br />
Dim chbxMassApprove As CheckBox = CType(MyRptItem.FindControl(&#8220;chbxMassApprove&#8221;), CheckBox)<br />
<strike>Dim PrimaryUniqueID As String = MyRptItem.DataItem(PrimaryUniqueID)</strike> <strong>PROBLEMATIC LINE</strong><br />
If chbxMassApprove.Checked = True Then<br />
&#8216;DO THE MASS APPROVE<br />
&#8216;LOOP THRU STORED PROCEDURE<br />
End If<br />
Next<br />
Catch exc As Exception<br />
Response.Write(exc.ToString)<br />
End Try<br />
End Sub</p></blockquote>
<p><strong>Solution: </strong><br />
I used this as a workaround if this helps anyone&#8230;</p>
<blockquote><p><u>Front End:</u><br />
Text=&#8217;&lt;%# DataBinder.Eval(Container, &#8220;DataItem.PrimaryUniqueID&#8221;) %&gt;&#8217;</p>
<p><u>Back End:</u><br />
Dim PrimaryUniqueID As String = ckbxMassApprove.Text.ToString</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.a8le.com/35/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

