Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9118579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:11:15+00:00 2026-06-17T05:11:15+00:00

I have an object I built in Javascript that I want to pass into

  • 0

I have an object I built in Javascript that I want to pass into a .NET .ASHX file and then parse out the various object properties.

Here is the object I built in Javascript:

function passSelection(prop1, prop2, prop3, prop4, prop5, prop6) {
this.prop1 = prop1value;
this.prop2 = prop2value;
this.prop3 = prop3value;
this.prop4 = prop4value;
this.prop5 = prop5value;
this.prop6 = prop6value;
};

Then I populate the object with values;

var javascriptObject = new passSelection(var1, var2, var3, var4, var4, var6); 

Then I call my ajax function to send the object to the .ASHX;

nameOfAjaxFunction(javascriptObject);

This all works well. But now inside the .ASHX I want to get the individual properties of the object so I set a .NET variable to the javascriptObject in my AJAX querystring. This also seems to work fine.

Dim objObjectVariable = context.Request.QueryString("javascriptObject")

So the question is: Now that I have a .NET variable set to the javascript object how do I reference the individual object properties?

Any hints or suggestions would be greatly appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:11:16+00:00Added an answer on June 17, 2026 at 5:11 am

    With Ajax you’ll be always sending strings to the server, not objects. In your case, nameOfAjaxFunction seems to be passing it via GET (POST would be the other option). The best way to pass an object is to encode it as JSON on your JS (from within nameOfAjaxFunction), then decode it back at the server end.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built an object in Javascript on the Google Apps Script engine and
I have a Javascript object that I'm trying to use as a hashmap. The
I have a class library that I have written in C#.net. I want to
I have an .aspx page built in SharePoint that I want to get the
I have a Javascript library that I want to use on a web browser
I have built a mock object using EasyMock, and I'm trying to have the
I have an NSArray full of NSDictionary object. This structure is built from a
I have a C# object that I am saving to RavenRB (build 1.0.960), the
I have a json object collection of geo locations that I build in the
I have a DLL that contains all my object I need to build my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.