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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:31:32+00:00 2026-05-24T23:31:32+00:00

I think I have everything working so far. One error left if the local

  • 0

I think I have everything working so far. One error left if the local variable error for ‘req’ … its already been declared above System.Net.WebRequest req = null; but i’m trying to clear it before using for WebRequest req = WebRequest.Create… do I not need to do that?

while (listId.Items.Count > 0)
            {
                // making the first item as selected.
                listId.SelectedIndex = 0;

                foreach (object o in listProxy.Items)
                {
                    string strProxy = o as string;
                    WebProxy proxyObject = new WebProxy(strProxy, true); // insert listProxy proxy here
                    WebRequest.DefaultWebProxy = proxyObject;

                    string strURL = "http://www.zzzz.com"; // link from listId and insert here
                    System.Net.WebRequest req = null;

                    try
                    {
                        WebRequest req = WebRequest.Create(strURL + "/book.php?qid=" + listId.SelectedItem as string);
                        req.Proxy = proxyObject;
                        req.Method = "POST";
                        req.Timeout = 5000;

                    }
                    catch (Exception eq)
                    {
                        string sErr = "Cannot connect to " + strURL + " : " + eq.Message;
                        MessageBox.Show(sErr, strURL, MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    }
                }

                // remove the selected item.
                listId.Items.RemoveAt(0);

                // refreshing the list.
                listId.Refresh();
            }
  • 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-05-24T23:31:32+00:00Added an answer on May 24, 2026 at 11:31 pm

    Change:

    WebRequest req = WebRequest.Create(strURL + "/book.php?qid=" + listId.SelectedItem as string);
    

    To:

       req = WebRequest.Create(strURL + "/book.php?qid=" + listId.SelectedItem as string);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do my initial upload to github. I think I have everything
I have done everything that is on the web (i think) i have the
Having an issue here that I have tried everything I can think of but
I've been working on getting one of our web maps to print out in
As a project I have been working on has grown, so has the frequency
I have this strange error in one of my rails 2.3.2 application. NoMethodError in
What I have so far is: A WPF application, using MVVM, IDataErrorInfo implemented. Everything
I have fresh Rails 2.2 install, thing is that everything work fine until I
I think I have a solution to this, but is there a better way,
I think I have a synchronization problem...It may be too basic..Please help.. I have

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.