Urgent: How to pass C# variable to HTML code
-
-
Does anyone know how to make use of a c# variable in html. In my C# code i have a variable EmbedTextBox.Text = this.OpenFileDialog; I want to use that same variable's contents in my HTML code e.g. which does not work. is there an easy of doing this?
That makes no sense. What are you trying to achieve? (at a higher level than putting a variable on an HTML page)
-
Does anyone know how to make use of a c# variable in html. In my C# code i have a variable EmbedTextBox.Text = this.OpenFileDialog; I want to use that same variable's contents in my HTML code e.g. which does not work. is there an easy of doing this?
I'm not very nowledgeable about ASP.NET, but maybe the following can help you or at least get you on the right way. You can use the
Page.Response
property to influence the HTTP response data that will be send back to the client. The returned object provides for example aWrite
method that allows you to write information to the HTTP output content stream.