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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to pass avariable in Code behind of form to the Nanagateurl property in HTML code?

How to pass avariable in Code behind of form to the Nanagateurl property in HTML code?

Scheduled Pinned Locked Moved ASP.NET
htmlhelptutorialquestion
4 Posts 2 Posters 1 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.
  • D Offline
    D Offline
    Dotnetdeveloper06
    wrote on last edited by
    #1

    Actaully i m genarating a variable value dynamicall in a program code behind of webform.i need to pass that variable into NavigateUrl experession in the HTML form. is it possible?if s can any one help me please.... Thanks, Dhanuja

    C 1 Reply Last reply
    0
    • D Dotnetdeveloper06

      Actaully i m genarating a variable value dynamicall in a program code behind of webform.i need to pass that variable into NavigateUrl experession in the HTML form. is it possible?if s can any one help me please.... Thanks, Dhanuja

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Where are you doing this ? You have a variable in the codebehind and you want to put it where ? The NavigateURL property also exists in the code behind, not on the server. If you have a variable, you can use it in building the string that you set on any property that is a string or object. Christian Graus - Microsoft MVP - C++

      D 1 Reply Last reply
      0
      • C Christian Graus

        Where are you doing this ? You have a variable in the codebehind and you want to put it where ? The NavigateURL property also exists in the code behind, not on the server. If you have a variable, you can use it in building the string that you set on any property that is a string or object. Christian Graus - Microsoft MVP - C++

        D Offline
        D Offline
        Dotnetdeveloper06
        wrote on last edited by
        #3

        i wann to pass variable to Navagate url in hyperlink in HTML Code of the same aspx page .

        C 1 Reply Last reply
        0
        • D Dotnetdeveloper06

          i wann to pass variable to Navagate url in hyperlink in HTML Code of the same aspx page .

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Create a protected variable in the codebehind with the same name as the control on the HTML, and then you can manipulate it's properties in the code behind. Prefer the ASP.NEt controls to native HTML, in fact there's no reason for you to ever put an anchor, or an input, etc. in the HTML of your page. Of course, you need runat='server' in your control tag for this to work. And without it, you're not using ASP.NEt in any meaningful way. Christian Graus - Microsoft MVP - C++

          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