473,683 Members | 3,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

"fdjsfhjksdhfjs dfhsdjhfsdfhsdj fhsd
jfdsjfksdjfksdj kfjsdfjksdjfsdj fd
fdsfhjsdhfjsdhf jf dsjf dsjfhjsdfhjksdh d fdsjf
hsdjkfhdjsfhsdj fh ds
fdsf dshfjdhsjfhsdjh fjsdh fds
dsjfh sdfhdsfjdshfjhd sfds"

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

OleDbConnection ("provider=sqlo ledb;server=loc alhost;database =tempdb;trusted _
connection=Yes" )
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles

MyBase.Load
Dim da As New OleDbDataAdapte r("select * from Message", con)
Dim ds As New DataSet
da.Fill(ds, "Message")
dltMessages.Dat aSource = ds
dltMessages.Dat aBind()
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
Sep 8 '05 #1
1 2262
yourString.Repl ace(Environment .NewLine, "<br>")

Try this.....
becasue when displaying the text in the datalist the browser reads it as
html, try using the Replace(Environ ment.NewLine, "<br>") when storing the
text in the db to replace each LineBreak with <br> in the database so when
getting the value the browser reades the <br> as tags and replaces them with
a Break line.
"Yoshitha" wrote:
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

"fdjsfhjksdhfjs dfhsdjhfsdfhsdj fhsd
jfdsjfksdjfksdj kfjsdfjksdjfsdj fd
fdsfhjsdhfjsdhf jf dsjf dsjfhjsdfhjksdh d fdsjf
hsdjkfhdjsfhsdj fh ds
fdsf dshfjdhsjfhsdjh fjsdh fds
dsjfh sdfhdsfjdshfjhd sfds"

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

OleDbConnection ("provider=sqlo ledb;server=loc alhost;database =tempdb;trusted _
connection=Yes" )
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles

MyBase.Load
Dim da As New OleDbDataAdapte r("select * from Message", con)
Dim ds As New DataSet
da.Fill(ds, "Message")
dltMessages.Dat aSource = ds
dltMessages.Dat aBind()
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

Sep 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3104
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format. However, the DataGrid begins to get very cumbersome as the number of columns of data you present increases. Anything more than half a dozen columns or so and you probably induce horizontal scrolling - a real no-no for me. If you put such a...
0
1763
by: Alex | last post by:
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Configuration Public Class Main : Inherits Page Private strConn As String =
4
2929
by: Martin | last post by:
I want to build a data entry form for creating and updating info on something. When I'm first creating an item all the fields need to be editable. There after some fields become readonly. Most of these fields are text based, and I really want to have them appear as a label rather than a text box that is read only. I really want different behaviour for creation, edit and view. I guess I need to write a templated data-bound control.
10
2846
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I have to add a datalist control. Using this datalist control I should be able to add edit, modify and cancel the items listed in this control. Here is how I designed. I used placeholder to add the controls dynamically to the page on the click...
3
2047
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is not declared". The data bind is for a DataList.)
1
1226
by: Yoshitha | last post by:
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
1
322
by: Yoshitha | last post by:
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
3
2214
by: Richard Carpenter | last post by:
I understand how to use a dropdown list control to display the associated description value for a foreign key in a parent rather than the key itself, but I don't like having to disable the control when I want to prevent editing (simply displaying in the display template of a datalist or detailview control, for example). I've not been able to find a way to edit the disabled color of the dropdown list, so it appears very washed out - just...
12
4702
by: brwalias | last post by:
Hi, using .net 2 sql server 2005 Here is my situation: I'm passing a variable in the url from a selection on Page A and need to display the results on the Results page be based on that variable in the url. I would like that variable to trigger a stored and
0
8504
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8922
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8771
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7582
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6429
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2934
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2195
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.