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. Web Development
  3. ASP.NET
  4. to get javascript variabl in codebehind

to get javascript variabl in codebehind

Scheduled Pinned Locked Moved ASP.NET
helpcsharpjavascripthtmlsysadmin
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.
  • P Offline
    P Offline
    P_Elza
    wrote on last edited by
    #1

    hi please help me..... am doing a mantanence project. i have writen some code to copy a file from server to harddisk. but there is some problem. i have developed this as windows application. now they want as web. tyhe problem is, i was reading the file path and copying in dos.in windos the path is already is there in html page in javascript. can i move the value to a the code behind string(C#). if we can convert how is it possible? in code behind there is string Customer, book on html page there is values of customer1 and journal as var customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>'; how can we get the values of customer1 and journal to Customer, book please help me.... please

    N P 2 Replies Last reply
    0
    • P P_Elza

      hi please help me..... am doing a mantanence project. i have writen some code to copy a file from server to harddisk. but there is some problem. i have developed this as windows application. now they want as web. tyhe problem is, i was reading the file path and copying in dos.in windos the path is already is there in html page in javascript. can i move the value to a the code behind string(C#). if we can convert how is it possible? in code behind there is string Customer, book on html page there is values of customer1 and journal as var customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>'; how can we get the values of customer1 and journal to Customer, book please help me.... please

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      P_Elza wrote:

      how can we get the values of customer1 and journal to Customer, book

      Put these values into a hidden server textbox control. Access the values from there in server side. Make sure you are not storing any sensitive information as it is easy to tamper.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

      1 Reply Last reply
      0
      • P P_Elza

        hi please help me..... am doing a mantanence project. i have writen some code to copy a file from server to harddisk. but there is some problem. i have developed this as windows application. now they want as web. tyhe problem is, i was reading the file path and copying in dos.in windos the path is already is there in html page in javascript. can i move the value to a the code behind string(C#). if we can convert how is it possible? in code behind there is string Customer, book on html page there is values of customer1 and journal as var customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>'; how can we get the values of customer1 and journal to Customer, book please help me.... please

        P Offline
        P Offline
        Prateek G
        wrote on last edited by
        #3

        You Can create two hidden variables with tag runat="server" and assign the values to these hidden fields and access it from server side.

        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