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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:42:55+00:00 2026-06-12T01:42:55+00:00

http://www.test.com/test.aspx?testinfo=&|& I am trying to replace & with values from a table. I got

  • 0

http://www.test.com/test.aspx?testinfo=&|&

I am trying to replace & with values from a table. I got name and age as two paramaters that I need to substitue and get url like this:

http://www.test.com/test.aspx?testinfo=name|age

If I have 3 string parameters to be replaced for a url:

http://www.test.com/test.aspx?testinfo=&|&

Viz name, age, address for the above url:

http://www.test.com/test.aspx?testinfo=name|age|address

string URL=string.Empty;
URL=http://www.test.com/test.aspx?testinfo=&|&;
//in this case fieldsCount is 2, ie. name and age
for(int i=0; i<fieldsCount.Length-1;i++)
{
      URL.Replace("*","name");
}

How do I add “age” so that I get ? any inputs will be helpful.

http://www.test.com/test.aspx?testinfo=name|age

  • 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-12T01:42:56+00:00Added an answer on June 12, 2026 at 1:42 am

    I think this is what you want,

        List<string> keys = new List<string>() { "name", "age", "param3" };
        string url = "http://www.test.com/test.aspx?testinfo=&|&;";
        Regex reg = new Regex("&");
        int count = url.Count(p => p == '&');
    
        for (int i = 0; i < count; i++)
        {
            if (i >= keys.Count)
                break;
            url = reg.Replace(url, keys[i], 1);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to retrieve a rss feed from this URL: http://www.8a.nu/rss/Main.aspx?UserId=19212&AscentType=0&ObjectClass=2&GID=3974d72911c05719152f0953e88cc2df There is no
I have a xml something likethis <root> <testxml> <details name=test url=http://www.test.com/test.aspx?val=100&val2=200 /> </testxml> <root>
I'm trying to accomplish the following layout, http://www.rae-mx.com/test/css-layout.jpg and I'm almost there, except for
here is the test page http://www.studioteknik.com/html/test-portfolio.html I got no error, but no hover-slide effect...
im using a simple test script from http://www.tuxradar.com/practicalphp/8/11/0 like this <?php $fp = fopen(foo.txt,
I have the html below: <span class=srch-URL> <a id=CSR_U_2 href=http://www.test.com/TestForm.aspx>http://www.test.com/TestForm.aspx</a> </span> I am trying
http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en The IE6/7/8 XP SP3 images made available for testing from Microsoft are set
Say I have a remote page accessed through http://www.mypage.com/test.aspx . On that page I
I referred to this article http://www.codeproject.com/KB/security/DotNetCrypto.aspx and I am trying write an encrypted string
i want to read a website in C# using this: WebRequest myWebRequest = WebRequest.Create(http://www.myurl.com/test.aspx);

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.