Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. protected void Button1_Click(object sender, EventArgs e)
  2. {
  3. try
  4. {
  5.  
  6. using (System.IO.StreamWriter writer = new System.IO.StreamWriter(@"D:\IDs.txt", true)) //(Server.MapPath("~/data.txt")
  7. {
  8. writer.WriteLine(idNum.Text);
  9. //writer.WriteLine(HttpContext.Current.Request.UserHostAddress);
  10. }
  11. Button1.Text = "נשלח בהצלחה";
  12. Button1.Enabled = false;
  13. //Response.Redirect("FormConfirmationPage.html");
  14. Response.Redirect("Default.aspx");
  15. }
  16. catch
  17. {
  18. // There was an error in writing to the file but I couldn't care less.
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement