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. arrays in javascript and c#

arrays in javascript and c#

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netdata-structuresquestion
2 Posts 2 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.
  • A Offline
    A Offline
    Ahmed Galal
    wrote on last edited by
    #1

    i need to pass a javascript array object to my asp.net, but how am going to do this ? is it possible to pass the object as an argument in the __doPostBack() function ? and how am going to convert the object to a c# string[] array or is there any other way to do this ? Thanx in advance.

    M 1 Reply Last reply
    0
    • A Ahmed Galal

      i need to pass a javascript array object to my asp.net, but how am going to do this ? is it possible to pass the object as an argument in the __doPostBack() function ? and how am going to convert the object to a c# string[] array or is there any other way to do this ? Thanx in advance.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, Basically, to pass a value from the client side to the server side you can use the hidden element to contain the value or attach the value to the query string of the url. In this case, you can save the array of client side objects in a hidden element, each value is seperated by a delimiter, then you can query it later in the server side code and use the String.Split method to parse the value into a string array.

      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