<?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>johnjcamilleri.com &#187; ASP.NET</title>
	<atom:link href="http://johnjcamilleri.com/category/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnjcamilleri.com</link>
	<description></description>
	<lastBuildDate>Sun, 25 Jul 2010 20:20:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>ASP.NET &#8211; Paging &amp; Sorting with GridView</title>
		<link>http://johnjcamilleri.com/2009/05/aspnet-paging-sorting-with-gridview/</link>
		<comments>http://johnjcamilleri.com/2009/05/aspnet-paging-sorting-with-gridview/#comments</comments>
		<pubDate>Wed, 06 May 2009 16:41:12 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://www.johnjcamilleri.com/blog/?p=32</guid>
		<description><![CDATA[I was a bit surprised that getting Paging &#38; sorting to work with ASP.NET&#8217;s GridView is not automatic.. but this tutorial is perfect, I just copied the code and it worked first time. Great! http://ryanolshan.com/technology/gridview-without-datasourcecontrol-datasource/]]></description>
			<content:encoded><![CDATA[<p>I was a bit surprised that getting Paging &amp; sorting to work with ASP.NET&#8217;s GridView is not automatic.. but this tutorial is perfect, I just copied the code and it worked first time.<br />
Great!</p>
<p><a href="http://ryanolshan.com/technology/gridview-without-datasourcecontrol-datasource/" class="external">http://ryanolshan.com/technology/gridview-without-datasourcecontrol-datasource/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johnjcamilleri.com/2009/05/aspnet-paging-sorting-with-gridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Postback Class Members</title>
		<link>http://johnjcamilleri.com/2009/04/aspnet-postback-class-members/</link>
		<comments>http://johnjcamilleri.com/2009/04/aspnet-postback-class-members/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 18:03:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[postback]]></category>
		<category><![CDATA[viewstate]]></category>

		<guid isPermaLink="false">http://www.johnjcamilleri.com/blog/?p=27</guid>
		<description><![CDATA[Found this helpful article I thought I&#8217;d post.. http://webpaws.com/blog/2008/08/19/postback-in-aspnet-passing-variables-on-postback/ Basically I had a class variable in an ASP.NET and found it was getting lost on page post-back.. well all you have to do is put that object in the Viewstate object already created for you. eg: public partial class MyPage : System.Web.UI.Page { protected int [...]]]></description>
			<content:encoded><![CDATA[<p>Found this helpful article I thought I&#8217;d post..<br />
<a href="http://webpaws.com/blog/2008/08/19/postback-in-aspnet-passing-variables-on-postback/">http://webpaws.com/blog/2008/08/19/postback-in-aspnet-passing-variables-on-postback/</a><br />
Basically I had a class variable in an ASP.NET and found it was getting lost on page post-back.. well all you have to do is put that object in the Viewstate object already created for you.</p>
<p>eg:</p>
<pre>public partial class MyPage : System.Web.UI.Page
{
        protected int MyInt;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
		MyInt = 12345;
                ViewState["MyKey"] = MyInt;
            }
        }

        /*
	 This is called on a page post-back...
	*/
	protected void Event(object sender, EventArgs e)
        {
			//Get factor list from viewstate
			MyInt = (int)ViewState["MyKey"];

			//Go nuts
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://johnjcamilleri.com/2009/04/aspnet-postback-class-members/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Returning Key/Value pairs from a .NET Web Service</title>
		<link>http://johnjcamilleri.com/2009/04/returning-keyvalue-pairs-from-a-net-web-service/</link>
		<comments>http://johnjcamilleri.com/2009/04/returning-keyvalue-pairs-from-a-net-web-service/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 16:51:41 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[dictionary]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[pair]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.johnjcamilleri.com/blog/?p=23</guid>
		<description><![CDATA[As soon as I started using Web Services I came against this problem, and loads of other people have asked it before but I didn&#8217;t really find a satisfactory answer. The easiest method is to create your own custom class (or a struct, as I did) and use that: The struct public struct KeyValueStruct { [...]]]></description>
			<content:encoded><![CDATA[<p>As soon as I started using Web Services I came against this problem, and loads of other people have asked it before but I didn&#8217;t really find a satisfactory answer. The easiest method is to create your own custom class (or a struct, as I did) and use that:</p>
<p><strong>The struct</strong></p>
<pre>
public struct KeyValueStruct
{
private int _key;
private string _val;

public int Key
{
get { return _key; }
set { _key = value; }
}
public string Value
{
get { return _val; }
set { _val = value; }
}

public KeyValueStruct(int key, string value)
{
_key = key;
_val = value;
}
}
</pre>
<p><strong>The web method</strong></p>
<pre>
[WebMethod]
[XmlInclude(typeof(KeyValueStruct))]
public List&lt;KeyValueStruct&gt;  GetEnergySources()
{
List&lt;KeyValueStruct&gt;  sources = new List&lt;KeyValueStruct&gt;();
sources.Add(new KeyValueStruct(1, "Solar"));
sources.Add(new KeyValueStruct(2, "Wind"));
return sources;
}
</pre>
<p>Simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnjcamilleri.com/2009/04/returning-keyvalue-pairs-from-a-net-web-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
