Show First Data In Textbox RRS feed

  • Question

  • User-807418713 posted


    For Example My Texbox shoows Like This Banner1.Jpg,banenr2.jpb,banner3.jpg

    I want to show in textbox2 on button click Banner1.jpg that is first word whatever use select

    how to do so using asp.net c# 

    Wednesday, January 23, 2019 10:23 AM


  • User475983607 posted

    Use string.Split(',')...

    textbox2.Text = Textbox.Text.Split(',')[0];

    Please set aside time to read the entire doc and go through a few code examples.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 23, 2019 1:02 PM