Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:25:44+00:00 2026-06-10T03:25:44+00:00

i am using a custom textbox control which doesn’t have Text.Split() function in this

  • 0

i am using a custom textbox control which doesn’t have Text.Split() function in this box i enter a string in the follwing format : “35 To 99” , now here is my code i know its wrong, my programming skills are limited

    Dim v1 As Int32
    Dim v2 As Int32
    Dim rule As New String("{0} To {1}", v1, v2) = TextBox1.Text
    MsgBox(v1 & " " & v2)

in other words how would you get the nubers in this string “35 To 99” assign each one to a variable without Text.Split()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:25:45+00:00Added an answer on June 10, 2026 at 3:25 am

    Split is a method of the String class, not the TextBox class. As such, it doesn’t matter where you get the string from, whether it be from a text box, a custom control, a file, or anywhere else, you can use the String.Split method to split it. For instance:

    Dim v1 As Int32
    Dim v2 As Int32
    Dim rule As String = TextBox1.Text
    Dim parts() As String = rule.Split(New String() {" To "}, StringSplitOptions.None)
    v1 = Integer.Parse(parts(0))
    v2 = Integer.Parse(parts(1))
    MessageBox.Show(v1 & " " & v2)
    

    Or, more tersely:

    ' ...
    Dim parts() As String = TextBox1.Text.Split(New String() {" To "}, StringSplitOptions.None)
    ' ...
    

    To make the split case insensitive, just force the case one way or the other on the whole string before you split it, for instance:

    Dim parts() As String = TextBox1.Text.ToLower().Split(New String() {" to "}, StringSplitOptions.None)
    

    or

    Dim parts() As String = TextBox1.Text.ToUpper().Split(New String() {" TO "}, StringSplitOptions.None)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Custom Control registered in the page using this code: <%@ Register
I have the following text box control ; <asp:TextBox ID=txtAmount runat=server AutoPostBack=true Width=85px class=validate[ERExpenseTypeDaterequired,custom[float]]
I am creating a custom text box control to have some default formatting and
Here's the situation: I have a custom TextBox control that contains multiple other TextBox
I have written a user control that contains a text box and a button.
I have a custom UserControl which contains several TextBoxes with Validators. One TextBox with
I found this code here which explains how to create custom controls. I have
I have custom control - using Win Forms, that contains four TextBoxes, all have
I have a C# UserControl that hosts a TextBox. When the custom control is
I'm trying to use the search text box (which I made by following this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.