Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Urgent: How to pass C# variable to HTML code

Urgent: How to pass C# variable to HTML code

Scheduled Pinned Locked Moved C#
csharphtmltutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jug Head
    wrote on last edited by
    #1

    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?

    C S 2 Replies Last reply
    0
    • J Jug Head

      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?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      That makes no sense. What are you trying to achieve? (at a higher level than putting a variable on an HTML page)


      Do you want to know more?

      1 Reply Last reply
      0
      • J Jug Head

        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?

        S Offline
        S Offline
        Stefan Troschuetz
        wrote on last edited by
        #3

        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 a Write method that allows you to write information to the HTTP output content stream.


        www.troschuetz.de

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups