Can a substring have mutiple arguments? I am pulling a substring from a drop down list into my database for records, the string is between 6 and 8 numbers, is it possible to pass more than one argument to make this work?
Sample data:
DropDownList
123456 | Name
1234567 | Name
12345678 | Name
dt = ExecuteStoredProcedure(SqlConnection, "InsertData", "@name", ddlE_VN.SelectedValue.Substring(0, 6))
Based on the data you show, this should work :
We are starting our substring at index 0, which is the first character. If the space is the sixth character, it will have an index of 5, so we will return the first 5 characters. If the space is the eighth character, it will have an index of 7, so we will return the first 7 characters, etc.