I am using page inheritance to put the same header tags on all of my web forms. Currently, I am creating a LiteralControl and putting the HTML tags in there, and then using Controls.Add to add the control to my web form. However, I don't seem to be able to use double-quotes inside the LiteralControl. This works:
This does not:
I've also tried
but it doesn't work. Is it possible to use double-quotes inside a LiteralControl? If so, how is it done?
Code:
LiteralControl ltcTest1 = new LiteralControl(@"
<html>
<head>
<title>Page Title</title>
</head>
<body>
");
This does not:
Code:
LiteralControl ltcTest2 = new LiteralControl(@"
<html>
<head>
<title>Page Title</title>
<link type="text/css" href="css/main.css" rel="stylesheet">
</head>
<body>
");
I've also tried
Code:
<link type=\"text/css\" href=\"css/main.css\" rel=\"stylesheet\">
but it doesn't work. Is it possible to use double-quotes inside a LiteralControl? If so, how is it done?