In case of website designing, we may come across a point, where we need to download a form after filling it. So we need some code behind this. In ASP.NET, its not a tough job. All we have to write these codes carefully and job done. I am giving an example. Please follow this. If any query, do comment.
First make an asp page. say form2doc.aspx. Make a textbox and button.
Then write code behind this page. On button click write this code and test your project. Make sure there is no blank space between code and don’t break the line until it terminates.