[Dnsmail-cvs] projeler/dosya-io Default.aspx, NONE, 1.1 Default.aspx.cs, NONE, 1.1 Web.Config, NONE
Brought to you by:
ethem
From: Ethem E. <et...@us...> - 2006-06-08 11:09:39
|
Update of /cvsroot/dnsmail/projeler/dosya-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20278/projeler/dosya-io Added Files: Default.aspx Default.aspx.cs Web.Config append.aspx.cs appendtext.aspx binaryread.aspx binaryread.aspx.cs binarywrite.aspx binarywrite.aspx.cs opentext.aspx opentext.aspx.cs writetext.aspx writetext.aspx.cs Log Message: Dosya islemleri --- NEW FILE: opentext.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { StreamReader objStreamReader; string strInput; if (File.Exists(MapPath("deneme.txt"))) { objStreamReader = File.OpenText(MapPath("deneme.txt")); strInput = objStreamReader.ReadLine(); while (strInput != null) { lblContents.Text += "<li>" + strInput; strInput = objStreamReader.ReadLine(); } objStreamReader.Close(); } else { lblContents.Text = "deneme.txt dosyasý bulunamadý!"; } } } --- NEW FILE: Default.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: opentext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binaryread.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: appendtext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binaryread.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { FileStream objFileStream; BinaryReader objBinaryReader; int intCounter; objFileStream = new FileStream(MapPath("deneme.data"), FileMode.Open, FileAccess.Read, FileShare.Read); objBinaryReader = new BinaryReader(objFileStream); for (int i = 0; i < 30; i++) { Response.Write("<li>" + objBinaryReader.ReadInt32().ToString()); } objBinaryReader.Close(); Response.Write("<BR>" + "hepsi okundu!"); } } --- NEW FILE: writetext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binarywrite.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: writetext.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { StreamWriter objStreamWriter; objStreamWriter = File.CreateText(MapPath("deneme.txt")); objStreamWriter.WriteLine(txtInput.Text); objStreamWriter.Close(); } protected void TextBox1_TextChanged(object sender, EventArgs e) { } protected void txtInput_TextChanged(object sender, EventArgs e) { } } --- NEW FILE: Default.aspx.cs --- using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button4_Click(object sender, EventArgs e) { } } --- NEW FILE: Web.Config --- <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings/> <connectionStrings/> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration> --- NEW FILE: append.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { StreamWriter aStreamWriter; aStreamWriter = File.AppendText(MapPath("deneme.txt")); aStreamWriter.WriteLine(txtInput.Text); aStreamWriter.Close(); } protected void TextBox1_TextChanged(object sender, EventArgs e) { } } --- NEW FILE: binarywrite.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { FileStream objFileStream; BinaryWriter objBinaryWriter; int intCounter; objFileStream = new FileStream(MapPath("deneme.data"), FileMode.Create); objBinaryWriter = new BinaryWriter(objFileStream); for (int i = 0; i < 50; i++) { objBinaryWriter.Write(i); } objBinaryWriter.Close(); Response.Write("ikili(binary) dosya yaratýldý"); } } |