|
|
Save a file as HTML
Step 1 : Save it as an HTML File Step 1 : Save it as an HTML File 1 @ First put the contents you need to write as an HTML file in to a div container Ex :<div id="b" runat=server> 2 @ Include a hidden field Ex :<input type="hidden" id="testing2" name="testing2" runat="server" /> 3 @ Include a script at the end of the page Ex :<script type="text/javascript" language="javascript"> 4 @ Go to the code behind of the page . The above things has to do in the html part of the page 5 @ Suppose we are doing the conversion in a button click.And here we are writing the file as an html file.Let it be test.txt.We can write this in any format.Eg : test.html.. so lets do it protected void Button1_Click(object sender, EventArgs e) }
|

