easyeman
Active member
I am doing web programming on a web site, and basically what I am doing is having a file so you can select sizes from a drop down menu and the code will cause the selected choice to bring up the correct size in the database system we have. I am doing this program using Visual Web Developer and it is Visual Basic.net code, so I figured this was the right place.
I can clarify more if I need to, but basically I have these fire adapters I'm putting on the web, and I can't get the code to work right (I use the same thing for a couple items, and one works and one doesn't, so not sure what's going on).
Anyway, it's set up like this: you choose the two adapter sizes, such as "1.0FNST" and "1.5FNST", and the part number after you chose would appear like this: "35R10FNST15FNST", so it'll have the starting number, and then add the two choices you select from a drop-down menu.
That's what it should do, however, when I put in the code, it keeps adding a letter into the second part so it will not work...so it ends up being "35R10FNST15FFNST" < adds an extra F in there for some reason. I cannot figure out how to remove it.
That's where I need someone's help. I'd like anyone to look it over and maybe figure out what's going on or if you see the error in the code. It's driving me crazy and I've updated it a few times and still get nothing and it has the same problem.
I appreciate any help and will give more info as to what I'm trying to do if people need it. Here is the code:
I can clarify more if I need to, but basically I have these fire adapters I'm putting on the web, and I can't get the code to work right (I use the same thing for a couple items, and one works and one doesn't, so not sure what's going on).
Anyway, it's set up like this: you choose the two adapter sizes, such as "1.0FNST" and "1.5FNST", and the part number after you chose would appear like this: "35R10FNST15FNST", so it'll have the starting number, and then add the two choices you select from a drop-down menu.
That's what it should do, however, when I put in the code, it keeps adding a letter into the second part so it will not work...so it ends up being "35R10FNST15FFNST" < adds an extra F in there for some reason. I cannot figure out how to remove it.
That's where I need someone's help. I'd like anyone to look it over and maybe figure out what's going on or if you see the error in the code. It's driving me crazy and I've updated it a few times and still get nothing and it has the same problem.
I appreciate any help and will give more info as to what I'm trying to do if people need it. Here is the code:
VB.NET:
Case "35RXX"
Select Case Left(Option1, 3)
Case ".75"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0", "2.5"
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
Case Else
NewDetails.NewProductID = "NOT AVAILABLE"
End Select
Case "1.0"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0", "2.5"
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
Case Else
NewDetails.NewProductID = "NOT AVAILABLE"
End Select
Case "1.5"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0", "2.5", "3.0"
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
Case Else
NewDetails.NewProductID = "NOT AVAILABLE"
End Select
Case "2.0"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0", "2.5", "3.0"
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
Case Else
NewDetails.NewProductID = "NOT AVAILABLE"
End Select
Case "2.5"
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
Case "3.0"
Select Case Left(Option2, 3)
Case ".75", "1.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
Case "3.5"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
Case "4.0"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
Case "4.5"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
Case "5.0"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
Case "6.0"
Select Case Left(Option2, 3)
Case ".75", "1.0", "1.5", "2.0"
NewDetails.NewProductID = "NOT AVAILABLE"
Case Else
Option1 = Option1.Replace(".", "")
Option2 = Option2.Replace(".", "")
NewDetails.NewProductID = "35R" & Option1 & Option2
End Select
End Select