skip to main | skip to sidebar
  • Home
  • Posts RSS
  • Comments RSS
  • Edit

Learn ASP.Net Tutorials

  • HOME
  • ASP.NET
  • C#.NET
  • HTML
  • JAVASCRIPT
  • SAMTUTS
  • Interview Questions
  • .Net Video Tutorials
  • WinRunner
  • QTP
  • VBSCRIPT
  • PERFORMANCE TESTING

ASP Tuts

  • ASP Introduction
  • ASP Protocols
  • ASP Internet Info Services
  • ASP Virtual Directory

ASP Standard Controls

  • ASP Label Control
  • ASP TextBox Control
  • ASP Button Control
  • ASP Link Button Control
  • ASP ImageButton Control
  • ASP HyperLink Control
  • ASP DropDownList Control
  • ASP ListBox Control
  • ASP CheckBox Control
  • ASP CheckBoxList Control
  • ASP RadioButton Control
  • ASP RadioButtonList Control
  • ASP Image Control
  • ASP ImageMap Control
  • ASP Calendar Control
  • ASP Table Control
  • ASP BulletedList Control
  • ASP Hidden Control
  • ASP Literal Control
  • ASP AdRotator Control
  • ASP Panel Control
  • ASP PlaceHolder Control
  • ASP FileUpload Control
  • ASP UserControl
  • ASP Custom Control

Random Tips and Tricks

  • ListView Control
  • Append Image to Text file
  • WindowsLogin validation
  • Sorting, Paging in Gridview
  • ASP Topics

Wednesday, September 8, 2010

How to Clear content of Text File

protected void Button3_Click(object sender, EventArgs e)
{
String FileName = Server.MapPath("Output.txt");

if (File.Exists(FileName))
{
using (StreamWriter sw = new StreamWriter(FileName))
{
sw.Write("");
}
}
}
Posted by MENDU at 11:57 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

0 comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)
Related Posts with Thumbnails

ASP Tuts Followers

Site Visitors

executive mba
 

© 2010 Learn ASP.Net Tutorials | Smash Theme by Thumb Press | Bloggerized by Free Blogger Template | Powered by Blogger