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

  • Home
  • SEARCH
  • 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 8788907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:15:26+00:00 2026-06-13T22:15:26+00:00

I am getting an object from a web service call and I am storing

  • 0

I am getting an object from a web service call and I am storing that in a hidden field by serializing the object.
Then I am deserilizing the object and it is coming like the below screenshot :

enter image description here

My problem is when I am trying to access the below information by many ways, I an getting
Invalid cast error OR System.InvalidCastException: Specified cast is not valid

decodedValues[0][2].Value
decodedValues[1][2].Value
decodedValues[2][2].Value

–etc

Any idea how can I get it in ASP.NET 1.1?

  • 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-13T22:15:28+00:00Added an answer on June 13, 2026 at 10:15 pm

    A simple method would do the trick:

    public string[] GetValues(object[] decodedValues)
    {
        string[] returnValues = new string[decodedValues.Length];
    
        for(int i=0; i<decodedValues.Length; i++)
        {
            returnValues[i] = ((XmlAttribute[])decodedValues[i])[2].Value;
        }
    
        return returnValues;
    }
    

    But remember: If the types from your screenshot don’t match, you’ll get your InvalidCastException.. So there is room for some improvement to check if the types match.

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

Sidebar

Related Questions

So, I'm getting a bunch of string values from a JSON object and then
I have web service in PHP which gets dateTime object (from asp) . I
I'm struggling getting the JSON string that was sent from a web page to
I'm trying to get image from web service and I'm getting an error. 'System.Web.UI.WebControls.Image'
I am getting the following exception when I call the WCF Service from ASP.NET
I want to read a response from a non-wsdl web service call using JAXB.
So I load my custom object from a web service and am trying to
Im getting my data from a web service and loads to a list view.
I'm getting the following block of xml back from a web service: <?xml version=1.0
I got following repsonse from a Web service call, I tried to unmarshal the

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.