Hi I want to append the line
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
to a text file but I am stuck at the "C#" , "WebForm1.aspx.cs" and "WebApplication1.WebForm1" part my code is as below
public string HeaderContent1()
{
var sb = new StringBuilder();
sb.Append("<%@ Page Language=");
sb.Append("c#");// prints only c#
sb.Append("AutoEventWireup=");
sb.Append("true");
sb.Append("CodeBehind=");
sb.Append("WebForm1.aspx.cs");// prints only WebForm1.aspx.cs I want with double quotes
sb.Append("WebApplication1.WebForm1");// prints only WebApplication1.WebForm1 I want with double quotes
sb.Append("%>");
sb.AppendLine();
sb.Append("<html>");
sb.AppendLine();// which is equal to Append(Environment.NewLine);
sb.Append("<head>");
sb.AppendLine();
sb.Append("<h1>New File header</h1>");
sb.AppendLine(); // which is equal to Append(Environment.NewLine);
sb.Append("</head>");
sb.AppendLine();
sb.Append("<body>");
sb.AppendLine(); // which is equal to Append(Environment.NewLine);
sb.Append("<h2> New File Body</h2>");
sb.AppendLine();
sb.Append("</body>");
sb.AppendLine();
sb.Append("</html>");
sb.AppendLine();
}