G Gr
G Gr

Reputation: 6080

Input string was not in the correct format

The code below produces an error saying that my input string was not in the correct format. Why?

private void button7_Click(object sender, EventArgs e)
{
    string uriAddTagtoGroup = 
      string.Format("http://localhost:8000/Service/AddTagtoGroup/{group}/{tag}",
                    textBox6.Text, textBox7.Text);
    //line above says input string was not in the correct format?
}

Upvotes: 0

Views: 625

Answers (1)

Adrian Iftode
Adrian Iftode

Reputation: 15663

 string.Format("http://localhost:8000/Service/AddTagtoGroup/{0}/{1}", 
                textBox6.Text, textBox7.Text);

use ordinals

Upvotes: 5

Related Questions