Click here to Skip to main content
15,894,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: problem with windows application Pin
Dave Kreskowiak13-Aug-09 1:52
mveDave Kreskowiak13-Aug-09 1:52 
Questionloop through all nodes in a treeNode Pin
reilak12-Aug-09 0:30
reilak12-Aug-09 0:30 
AnswerRe: loop through all nodes in a treeNode Pin
padmanabhan N12-Aug-09 0:42
padmanabhan N12-Aug-09 0:42 
AnswerRe: loop through all nodes in a treeNode Pin
Luc Pattyn12-Aug-09 0:45
sitebuilderLuc Pattyn12-Aug-09 0:45 
AnswerRe: loop through all nodes in a treeNode Pin
stancrm12-Aug-09 0:46
stancrm12-Aug-09 0:46 
QuestionDataSet DateTime Binding Issue Pin
VenkataRamana.Gali12-Aug-09 0:25
VenkataRamana.Gali12-Aug-09 0:25 
AnswerRe: DataSet DateTime Binding Issue [Post bumping, please ignore] Pin
Henry Minute12-Aug-09 2:16
Henry Minute12-Aug-09 2:16 
QuestionRepeat For Each ListView Item Pin
iNutR11-Aug-09 23:52
iNutR11-Aug-09 23:52 
ive got this code, and it works for my old app, but for this one it doesnt work :S
it just repeats the same process with the first item from the listview.
i want it to run through each of them.
and dont worry, i want it to be continuous.
please help :S


while (0 == 0)
{
    int iCount = lvAccounts.Items.Count;
    string inputURL = textBox1.Text;
    inputURL = inputURL.Replace("http://", null);


    ListViewItem[] accUserPass = new ListViewItem[iCount];
    lvAccounts.Items.CopyTo(accUserPass, 0);

    for (int i = 0; i < accUserPass.Length; i++)
    {

        foreach (ListViewItem item in lvAccounts.Items)
        {

            {

                ListViewItem lvi = new ListViewItem();
                ListViewItem.ListViewSubItem lvsi = new ListViewItem.ListViewSubItem();



                try
                {
                    WebClient dwnload = new WebClient();

                    byte[] myData = dwnload.DownloadData("http://" + accUserPass[i].Text + ":" + accUserPass[i].SubItems[1].Text + "@" + inputURL);
                    MessageBox.Show("http://" + accUserPass[i].Text + ":" + accUserPass[i].SubItems[1].Text + "@" + inputURL);



                    accUserPass[i].SubItems[2].Text = "Downloaded";
                    int amountdownloaded = Convert.ToInt32(label2.Text);
                    amountdownloaded = amountdownloaded + 1;
                    label2.Text = Convert.ToString(amountdownloaded);
                }



                catch (Exception)
                {

                    accUserPass[i].SubItems[2].Text = "Failed";
                }



            }
        }

    }
}


what i want to do is download the same data, but use a different user:pass combination each time.

like
say i have listview like this:
User|Pass
User2|Pass2

i want to download file 'x' with the user pass in front

so with that listview i want to initiate a download of

User:Pass@x
User2:Pass2@x

but with what i have, i just get the User:Pass combination twice

i dont know why
AnswerRe: Repeat For Each ListView Item Pin
Mycroft Holmes12-Aug-09 1:31
professionalMycroft Holmes12-Aug-09 1:31 
Questionword 2007 template application Pin
AmbitiousBeginner11-Aug-09 23:48
AmbitiousBeginner11-Aug-09 23:48 
AnswerRe: word 2007 template application Pin
benjymous12-Aug-09 0:29
benjymous12-Aug-09 0:29 
GeneralRe: word 2007 template application Pin
AmbitiousBeginner12-Aug-09 0:36
AmbitiousBeginner12-Aug-09 0:36 
GeneralRe: word 2007 template application Pin
benjymous12-Aug-09 0:44
benjymous12-Aug-09 0:44 
GeneralRe: word 2007 template application Pin
padmanabhan N12-Aug-09 0:47
padmanabhan N12-Aug-09 0:47 
QuestionHow was use namedpipes to communicate with other application in a network? Pin
svt gdwl11-Aug-09 23:46
svt gdwl11-Aug-09 23:46 
AnswerRe: How was use namedpipes to communicate with other application in a network? Pin
stancrm12-Aug-09 0:10
stancrm12-Aug-09 0:10 
GeneralRe: How was use namedpipes to communicate with other application in a network? Pin
svt gdwl12-Aug-09 0:50
svt gdwl12-Aug-09 0:50 
GeneralRe: How was use namedpipes to communicate with other application in a network? Pin
stancrm12-Aug-09 0:54
stancrm12-Aug-09 0:54 
Questionaccessing controls of one form in another form Pin
MahaKh11-Aug-09 22:56
MahaKh11-Aug-09 22:56 
AnswerRe: accessing controls of one form in another form [modified] Pin
OriginalGriff11-Aug-09 23:41
mveOriginalGriff11-Aug-09 23:41 
QuestionApplication definition was successfully imported, but Entity X has no identifiers defined in the SpecificFinder view Pin
hdv21211-Aug-09 22:38
hdv21211-Aug-09 22:38 
QuestionHow to convert .MPP File to .XML File in C# Pin
Rajesh_K_Sharma11-Aug-09 22:27
Rajesh_K_Sharma11-Aug-09 22:27 
AnswerRe: How to convert .MPP File to .XML File in C# Pin
Alenzo_Eid10-Mar-10 0:45
Alenzo_Eid10-Mar-10 0:45 
QuestionHow to Split one datatable to many datatables? Pin
NguyenDzung11-Aug-09 21:58
NguyenDzung11-Aug-09 21:58 
AnswerRe: How to Split one datatable to many datatables? Pin
dan!sh 11-Aug-09 22:14
professional dan!sh 11-Aug-09 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.