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 8778309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:30:14+00:00 2026-06-13T19:30:14+00:00

So I have the following code: public override void Extract(object sender, ExtractionEventArgs e) {

  • 0

So I have the following code:

    public override void Extract(object sender, ExtractionEventArgs e)
    {
            if (e.Response.HtmlDocument != null)
            {

                var myParam = e.Request.QueryStringParameters.Where(parameter => parameter.Name == QueryName).Select(parameter => parameter.Value).Distinct();

                myParam.

                // add the extracted value to the web performance test context
                e.WebTest.Context.Add(this.ContextParameterName, myParam.ToString());
                e.Success = true;
                return;

            }


        // If the extraction fails, set the error text that the user sees
        e.Success = false;
        e.Message = String.Format(CultureInfo.CurrentCulture, "Not Found: {0}", QueryName);
    }

It’s returning:

System.Linq.Enumerable+<DistinctItem>d_81`1[system.string]

I am expecting something along the lines of:

0152-1231-1231-123d

My question is how do I extract the querystring’s actual value from extractioneventargs. They say it’s possible, but I have no idea.

  • 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-13T19:30:16+00:00Added an answer on June 13, 2026 at 7:30 pm

    You could use string.Join:

    string resultAsString = string.Join("-", myParam);
    e.WebTest.Context.Add(this.ContextParameterName, resultAsString);
    

    I’m assuming here that the query string parameter values are 0152, 1231, etc, and you want to combine them with dashes.

    Since WebTest.Context.Add can accept an object, you could also add the result as an array, if that suits your purposes:

    e.WebTest.Context.Add(this.ContextParameterName, myParam.ToArray());
    

    (Note that this string System.Linq.Enumerable+<DistinctItem>d_81``1[system.string] is the type name, which is what ToString() returns for any object by default (unless it’s been overridden).)

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

Sidebar

Related Questions

I have the following code: public void Dispose() { bool append = true; using(var
I have the following code: public class MyLocationListener implements LocationListener { @Override public void
I have the following code: SharedPreferences KITPrefs; EditText passPhraseExample; ... @Override public void onCreate(Bundle
I have following appDomainManager code public class HostAppDomainManager : AppDomainManager { public override void
I have following code: public static void ProcessStep(Action action) { //do something here if
I have following code public class TEST { public static void main(String arg[]){ try
I have the following code: public void disconnect() { running = false; if(thread !=
i have the following code: public static void Serialize() { List<string> dirs = FileHelper.GetFilesRecursive(fileDirectoryPath);
I have the following code: public virtual void Initialise() { this.AddHeader(SystemContext, this.UserSettings.SystemContext); } public
I have the following: public override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); if (filterContext ==

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.