<?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>.toString() &#187; Multiple parameters</title>
	<atom:link href="http://www.dottostring.com/tag/multiple-parameters/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dottostring.com</link>
	<description>Programming is our passion</description>
	<lastBuildDate>Sun, 04 Oct 2009 15:57:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Passing Multiple CommandArguments on button click</title>
		<link>http://www.dottostring.com/2008/11/passing-multiple-commandarguments-on-button-click/</link>
		<comments>http://www.dottostring.com/2008/11/passing-multiple-commandarguments-on-button-click/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 15:35:28 +0000</pubDate>
		<dc:creator>ahsan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[CommandArgument]]></category>
		<category><![CDATA[Multiple parameters]]></category>
		<category><![CDATA[RowCommand]]></category>

		<guid isPermaLink="false">http://www.dottostring.com/?p=60</guid>
		<description><![CDATA[I have got a problem and i want to share with all of you. Sometimes there exists a scenario when you have to pass multiple command arguments on a button click.
The following code i used and it did the trick:
My Example contains a gridview containing a boundfield and a template field
&#60;asp:GridView ID="gvEmail" runat="server" SkinID="DefaultGVWithoutPaging" &#62;
&#60;Columns&#62;
&#60;asp:BoundField [...]]]></description>
			<content:encoded><![CDATA[<p>I have got a problem and i want to share with all of you. Sometimes there exists a scenario when you have to pass multiple command arguments on a button click.<br />
The following code i used and it did the trick:</p>
<p>My Example contains a gridview containing a boundfield and a template field</p>
<pre name="code" class="html">&lt;asp:GridView ID="gvEmail" runat="server" SkinID="DefaultGVWithoutPaging" &gt;
&lt;Columns&gt;
&lt;asp:BoundField HeaderText="Title" DataField="Title" /&gt;
&lt;asp:TemplateField&gt;
&lt;ItemTemplate&gt;
&lt;asp:ImageButton ID="ibtnEdit" SkinID="EditButtonImageSkin" CommandName="EditEmails" CommandArgument='&lt;%#Container.DataItem("FileName") &amp; ";" &amp; Container.DataItem("Keywords") %&gt;' runat="server" /&gt;
&lt;/ItemTemplate&gt;
&lt;/asp:TemplateField&gt;
&lt;/Columns&gt;
&lt;/asp:GridView&gt;</pre>
<p>And on Server side use the split operator to split, i use the &#8216;;&#8217; character as splitter</p>
<pre name="code" class="vb.net">Protected Sub gvEmail_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gvEmail.RowCommand
If e.CommandName = "EditEmails" Then

Dim paraArray() As String
paraArray = e.CommandArgument.ToString.Split(CChar(";"))

End If
End Sub

Hope to help someone.</pre>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.dottostring.com%2F2008%2F11%2Fpassing-multiple-commandarguments-on-button-click%2F';
  addthis_title  = 'Passing+Multiple+CommandArguments+on+button+click';
  addthis_pub    = 'erfaan';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.dottostring.com/2008/11/passing-multiple-commandarguments-on-button-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
