about displaying data in datalist control

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default about displaying data in datalist control

    hi
    I have datalist control in my ASP.NET application
    the problem here is
    i have used a textbox with multiline true propertly when i enter data like

    "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd
    jfdsjfksdjfksdjkfjsdfjksdjfsdjfd
    fdsfhjsdhfjsdhfjf dsjf dsjfhjsdfhjksdh d fdsjf
    hsdjkfhdjsfhsdjfh ds
    fdsf dshfjdhsjfhsdjhfjsdh fds
    dsjfh sdfhdsfjdshfjhdsfds"

    it is storing as it is ...when i displaying in the datalist like this
    Dim con As New

    OleDbConnection("provider=sqloledb;server=localhos t;database=tempdb;trusted_
    connection=Yes")
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles

    MyBase.Load
    Dim da As New OleDbDataAdapter("select * from Message", con)
    Dim ds As New DataSet
    da.Fill(ds, "Message")
    dltMessages.DataSource = ds
    dltMessages.DataBind()
    End Sub
    it is showing in a single line it is not displaying in paragrah wise .......

    how to display data in data list as it is.
    Please help me ....

    thanx in advance
    yoshitha


    Yoshitha Guest

  2. Similar Questions and Discussions

    1. DATALIST control
      Hello, I have a doubt... I have a TextBox by name txtMessage.Text ,Button by name btnSend and Datalist Control by name dltMessage i my aspx...
    2. Getting control of Items within a Datalist
      I have a problem as I have placed a dropdownlist in a datalist. Whenever the selected index changes I need to change a label inside the datalist....
    3. DataList parrent control with a Repeater child control
      I've been trying to bind a Repeater 'child control' to a DataList control and seem to have lost the plot. Tec spec: Connection to SQL server 2...
    4. Use the DataList Control to Present and Edit Data PART 2
      Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports...
    5. Use the DataList Control to Present and Edit Data
      I found some good information On "Use the DataList Control to Present and Edit Data" at this site...
  3. #2

    Default Re: about displaying data in datalist control

    You should call String.Replace("\r\n", "<br/>") -- replace the CrLf with
    HTML breaks.

    -Brock
    DevelopMentor
    [url]http://staff.develop.com/ballen[/url]


    > hi
    > I have datalist control in my ASP.NET application
    > the problem here is
    > i have used a textbox with multiline true propertly when i enter data
    > like
    > "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd
    > jfdsjfksdjfksdjkfjsdfjksdjfsdjfd
    > fdsfhjsdhfjsdhfjf dsjf dsjfhjsdfhjksdh d fdsjf
    > hsdjkfhdjsfhsdjfh ds
    > fdsf dshfjdhsjfhsdjhfjsdh fds
    > dsjfh sdfhdsfjdshfjhdsfds"
    > it is storing as it is ...when i displaying in the datalist like this
    > Dim con As New
    >
    > OleDbConnection("provider=sqloledb;server=localhos t;database=tempdb;tr
    > usted_
    > connection=Yes")
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles
    > MyBase.Load
    > Dim da As New OleDbDataAdapter("select * from Message", con)
    > Dim ds As New DataSet
    > da.Fill(ds, "Message")
    > dltMessages.DataSource = ds
    > dltMessages.DataBind()
    > End Sub
    > it is showing in a single line it is not displaying in paragrah wise
    > .......
    > how to display data in data list as it is.
    > Please help me ....
    > thanx in advance
    > yoshitha


    Brock Allen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139