Author: bthumber | Posted on: 6/21/2010 5:49:09 PM | Views : 286

Specified argement was out of range of valid values. Parameter name i:
That was my error please see the code below:
if (FileUpload1.HasFile) { string filepath = FileUpload1.PostFile.FileName; string pat = @"\\(?:.+) \\ (.+) \. (.+)"; Regex r = new Regex(pat); // run Match m = r.Match(filepath); string file_ext = m.Group[2].Captures[0].ToString(); // error on this line string filename = m.Group[1].Captures[0].ToString(); string file = filename + "." + file_ext; }
Was is causing the error and how do I fix it? 
...

Go to the complete details ...