Viewing source for recipe1718cs.aspx

<%@ Page %>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e)
{
	System.IO.IsolatedStorage.IsolatedStorageFileStream stream = null;
	System.IO.StreamWriter writer = null;
	String data = "The data you want to store";

	try
	{
		stream = new System.IO.IsolatedStorage.IsolatedStorageFileStream("datafile.txt", System.IO.FileMode.OpenOrCreate);
		writer = new System.IO.StreamWriter(stream);

		writer.WriteLine(data);
	}
	catch (Exception ex)
	{
		Response.Write(ex.ToString());
	}
	finally
	{
		writer.Close();
		stream.Close();
	}
}
</script>