we have data in one of a table which has
tag to break line while rendering the data in web.
for example:
Day | ToDoList
------------ ----------------------------------
Sunday | Wake up at 8am
Visit Parents
------------ ----------------------------------
Monday | Wake up at 7am
Go to Work
------------ ----------------------------------
How do i achieve this.
tag to break line while rendering the data in web.
for example:
Day | ToDoList
------------ ----------------------------------
Sunday | Wake up at 8am
Visit Parents
------------ ----------------------------------
Monday | Wake up at 7am
Go to Work
------------ ----------------------------------
I need to get the data from that table and need to load in another table for another application, which also render
the data in browser. But this application export this data in excel file as well.
I do not want
tag between data in my new table and excel file but i do want line break.
the data in browser. But this application export this data in excel file as well.
I do not want
tag between data in my new table and excel file but i do want line break.
Day | ToDoList
------------ ----------------------------------
Sunday | Wake up at 8am
| Visit Parents
------------ ----------------------------------
Monday | Wake up at 7am
| Go to Work
------------ ----------------------------------
------------ ----------------------------------
Sunday | Wake up at 8am
| Visit Parents
------------ ----------------------------------
Monday | Wake up at 7am
| Go to Work
------------ ----------------------------------
How do i achieve this.
This is what i have tried but it did not work.
#1
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", vbCrLf))
Else
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", vbCrLf))
Else
#2
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", Environment.NewLine))
Else
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", Environment.NewLine))
Else
#3
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", "+Char(13)+char(10)"))
Else
If Not String.IsNullOrWhiteSpace(row("ToDoList").ToString) Then
cmd.Parameters.AddWithValue("@pToDoList", (row("ToDoList").ToString).Replace("
", "+Char(13)+char(10)"))
Else
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit GuptaPosted Aug 30, 2017, 2:28 PM