Re: splitting field by comma

Discussion in 'ASP .Net' started by Kevin Spencer, May 19, 2004.

  1. Dim SomeString As String = Replace(SomeOtherString, ",", VbCrLf)

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Paola" <> wrote in message
    news:...
    > I have a field that I would like to split by commas. Does anyone know how

    I can do this either by t-sql or vb? The ideal is for the detail.aspx page
    to line break on each comma in the field. Please help!
    >
    > Paola
    Kevin Spencer, May 19, 2004
    #1
    1. Advertising

  2. How can I incorporate this into an asp:label with a dataview? Currently the field is being displayed using this code
    <asp:label id=dept runat="server" Font-Size="Smaller" Font-Names="Arial" Text='<%# DataBinder.Eval(DataView1, "[0].CATEGORY_APPROVER")%>'></asp:label
    What can I add to get it to split by comma? I'm a beginner and don't know how to modify the code to get the split

    Paola
    =?Utf-8?B?UGFvbGE=?=, May 20, 2004
    #2
    1. Advertising

  3. Kevin Spencer

    Dan Brussee Guest

    On Wed, 19 May 2004 17:11:02 -0700, "Paola"
    <> wrote:

    >How can I incorporate this into an asp:label with a dataview? Currently the field is being displayed using this code:
    ><asp:label id=dept runat="server" Font-Size="Smaller" Font-Names="Arial" Text='<%# DataBinder.Eval(DataView1, "[0].CATEGORY_APPROVER")%>'></asp:label>
    >What can I add to get it to split by comma? I'm a beginner and don't know how to modify the code to get the split.
    >


    Split what by comma? IS CATEGORY_APPROVER a comma seperated list in a
    text string? Do you need this on multiple lines? In a dropdown list?
    "MORE INPUT" :)
    Dan Brussee, May 20, 2004
    #3
  4. Correct category approver is a comma separated list. Yes I do need it to line break after each comma. No not a drop down list, to be displayed in a table. Thanks, I hope you can help me out

    Paol

    ----- Dan Brussee wrote: ----

    On Wed, 19 May 2004 17:11:02 -0700, "Paola
    <> wrote

    >How can I incorporate this into an asp:label with a dataview? Currently the field is being displayed using this code
    ><asp:label id=dept runat="server" Font-Size="Smaller" Font-Names="Arial" Text='<%# DataBinder.Eval(DataView1, "[0].CATEGORY_APPROVER")%>'></asp:label>>What can I add to get it to split by comma? I'm a beginner and don't know how to modify the code to get the split



    Split what by comma? IS CATEGORY_APPROVER a comma seperated list in
    text string? Do you need this on multiple lines? In a dropdown list
    "MORE INPUT" :
    =?Utf-8?B?UGFvbGE=?=, May 20, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Ericson
    Replies:
    0
    Views:
    419
    John Ericson
    Jul 19, 2003
  2. Mark
    Replies:
    0
    Views:
    433
  3. John Dibling
    Replies:
    0
    Views:
    405
    John Dibling
    Jul 19, 2003
  4. MSNEWS

    Splitting comma-seperated items

    MSNEWS, Apr 21, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    304
    Cowboy \(Gregory A. Beamer\)
    Apr 21, 2007
  5. Søren M. Olesen

    Splitting comma delimited text

    Søren M. Olesen, May 11, 2006, in forum: Perl Misc
    Replies:
    2
    Views:
    98
    DJ Stunks
    May 15, 2006
Loading...

Share This Page