Click here to Skip to main content
15,914,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRemove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 8:18
Bob Zagars14-Jan-06 8:18 
AnswerRe: Remove the back slash in a TextBox Pin
Joshua Quick14-Jan-06 8:40
Joshua Quick14-Jan-06 8:40 
GeneralRe: Remove the (Forward) slash in a TextBox Pin
Bob Zagars14-Jan-06 8:46
Bob Zagars14-Jan-06 8:46 
GeneralRe: Remove the (Forward) slash in a TextBox Pin
Joshua Quick14-Jan-06 9:00
Joshua Quick14-Jan-06 9:00 
GeneralRe: Remove the (back) slash in a TextBox Pin
Bob Zagars14-Jan-06 10:38
Bob Zagars14-Jan-06 10:38 
AnswerRe: Remove the back slash in a TextBox Pin
Joshua Quick14-Jan-06 11:07
Joshua Quick14-Jan-06 11:07 
GeneralRe: Remove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 11:28
Bob Zagars14-Jan-06 11:28 
GeneralRe: Remove the back slash in a TextBox Pin
Joshua Quick14-Jan-06 12:22
Joshua Quick14-Jan-06 12:22 
Bob Zagars wrote:
That would cause a problem if the back slash was at postion 0. This error happens even when the position is in the middle of the string.


Your code has 2 bugs in it then. The first one I already mentioned. The second bug is with how you're extracting the substring.

You are being confused by the Mid() function. Mid() is a function that was used in VB6 and only exists in VB.NET for compatibility reasons. Mid() expects 1 based indexes, which is the way indexing used to work in VB6. The .NET String class uses zero based indexes. This is why you are one character off.
You should call String.Substring() instead.
GeneralRe: Remove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 12:38
Bob Zagars14-Jan-06 12:38 
GeneralRe: Remove the back slash in a TextBox Pin
Joshua Quick14-Jan-06 12:58
Joshua Quick14-Jan-06 12:58 
GeneralRe: Remove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 13:14
Bob Zagars14-Jan-06 13:14 
GeneralRe: Remove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 11:40
Bob Zagars14-Jan-06 11:40 
GeneralRe: Remove the back slash in a TextBox Pin
Joshua Quick14-Jan-06 12:04
Joshua Quick14-Jan-06 12:04 
GeneralRe: Remove the back slash in a TextBox Pin
Bob Zagars14-Jan-06 12:10
Bob Zagars14-Jan-06 12:10 
AnswerRe: Remove the back slash in a TextBox Pin
CodyGen15-Jan-06 4:37
CodyGen15-Jan-06 4:37 
GeneralRe: Remove the back slash in a TextBox Pin
Dave Kreskowiak15-Jan-06 16:35
mveDave Kreskowiak15-Jan-06 16:35 
Questioninvoke to marshal Pin
Makniteasy14-Jan-06 8:07
Makniteasy14-Jan-06 8:07 
AnswerRe: invoke to marshal Pin
Joshua Quick14-Jan-06 8:52
Joshua Quick14-Jan-06 8:52 
QuestionPassing values to a page....... Pin
daviiie13-Jan-06 23:14
daviiie13-Jan-06 23:14 
AnswerRe: Passing values to a page....... Pin
mrabaya14-Jan-06 7:21
mrabaya14-Jan-06 7:21 
QuestionHi I 'm new Need Help abt VB Pin
gorillazpetersu13-Jan-06 20:05
gorillazpetersu13-Jan-06 20:05 
AnswerRe: Hi I 'm new Need Help abt VB Pin
Joshua Quick13-Jan-06 21:45
Joshua Quick13-Jan-06 21:45 
AnswerRe: Hi I 'm new Need Help abt VB Pin
mrabaya14-Jan-06 7:27
mrabaya14-Jan-06 7:27 
GeneralRe: Hi I 'm new Need Help abt VB Pin
gorillazpetersu14-Jan-06 15:16
gorillazpetersu14-Jan-06 15:16 
QuestionHow do I bind a multi-table DataSet to a Web Forms DataGrid Pin
kenn_rosie13-Jan-06 15:39
kenn_rosie13-Jan-06 15:39 

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.