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. How to accept value from javascript in c#

How to accept value from javascript in c#

Scheduled Pinned Locked Moved C#
helpcsharpjavascripttutorial
4 Posts 4 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.
  • S Offline
    S Offline
    Sapan Roy
    wrote on last edited by
    #1

    confused: Hi, all I have a function change() in javascript which return a id. While I am recieving this ID in TextBox1.Text = change() // error can not convert void to string. Is there any way to solve this error. Please help me... Thanks Sapan Man are born to succed not to fail

    C 1 Reply Last reply
    0
    • S Sapan Roy

      confused: Hi, all I have a function change() in javascript which return a id. While I am recieving this ID in TextBox1.Text = change() // error can not convert void to string. Is there any way to solve this error. Please help me... Thanks Sapan Man are born to succed not to fail

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

      First of all, this is the C# forum. You probably want the ASP.NET forum. Second, how can we tell you what's wrong with your code, if you don't post it ? Your control on the client side will have a different name to on the server side, and does not have a Text property. Half of the code you posted is C# and half is a javascript call. You need to find the control in javascript, and set it's value, using javascript.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      S 1 Reply Last reply
      0
      • C Christian Graus

        First of all, this is the C# forum. You probably want the ASP.NET forum. Second, how can we tell you what's wrong with your code, if you don't post it ? Your control on the client side will have a different name to on the server side, and does not have a Text property. Half of the code you posted is C# and half is a javascript call. You need to find the control in javascript, and set it's value, using javascript.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        the Same is posted it in the Asp.net Forum also.

        Regards, Satips.:rose:

        V 1 Reply Last reply
        0
        • S Sathesh Sakthivel

          the Same is posted it in the Asp.net Forum also.

          Regards, Satips.:rose:

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          Some people always take sheer pleasure of cross posting and spoiling the good fine fabric of discussion forums.

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          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