hi every body!
i want to do this, but vs.net dont let me to do it!!! :-(
<td width="81%" height="115" rowspan="3" id="txtcell" runat="server">
<%# (DataBinder.Eval(Container.DataItem,"logtext").ToS tring().Replace("
"," ")
DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("\n","<BR>"))
%>
</td>
i don,t want to changing my data in db.
thanks. 3 2764
You are evaluating two things, with no expression in between to say what
you should do with the two strings.
Why not do this?
<%# HttpUtility.HtmlEncode((string) DataBinder.Eval(Container.DataItem,
"logtext")).Replace("\n", "<BR>") %>
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<fa*****@yahoo.comwrote in message
news:11**********************@v61g2000cwv.googlegr oups.com...
hi every body!
i want to do this, but vs.net dont let me to do it!!! :-(
<td width="81%" height="115" rowspan="3" id="txtcell" runat="server">
<%# (DataBinder.Eval(Container.DataItem,"logtext").ToS tring().Replace("
"," ")
DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("\n","<BR>"))
%>
</td>
i don,t want to changing my data in db.
thanks.
You have misunderstood how the Replace method actually works. It's used
on a string value to create a new string value with the replacements.
As the Replace method returns a string, you can use that string in the
next Replace method:
<%# DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("
"," ").Replace("\n","<BR>") %> fa*****@yahoo.com wrote:
hi every body!
i want to do this, but vs.net dont let me to do it!!! :-(
<td width="81%" height="115" rowspan="3" id="txtcell" runat="server">
<%# (DataBinder.Eval(Container.DataItem,"logtext").ToS tring().Replace("
"," ")
DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("\n","<BR>"))
%>
</td>
i don,t want to changing my data in db.
thanks.
Göran Andersson wrote:
You have misunderstood how the Replace method actually works. It's used
on a string value to create a new string value with the replacements.
As the Replace method returns a string, you can use that string in the
next Replace method:
<%# DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("
"," ").Replace("\n","<BR>") %>
fa*****@yahoo.com wrote:
hi every body!
i want to do this, but vs.net dont let me to do it!!! :-(
<td width="81%" height="115" rowspan="3" id="txtcell" runat="server">
<%# (DataBinder.Eval(Container.DataItem,"logtext").ToS tring().Replace("
"," ")
DataBinder.Eval(Container.DataItem,"logtext").ToSt ring().Replace("\n","<BR>"))
%>
</td>
i don,t want to changing my data in db.
thanks.
thanx a lot "Göran", my problem solved!
best regards!!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: pembed2003 |
last post by:
Hi all,
I need to write a function to search and replace part of a char*
passed in to the function. I came up with the following:
char* search_and_replace(char* source,char search,char*...
|
by: Paul |
last post by:
hi, there,
for example,
char *mystr="##this is##a examp#le";
I want to replace all the "##" in mystr with "****". How can I do this?
I checked all the string functions in C, but did not...
|
by: Etu |
last post by:
Hi,
I have a string:
string c = "'abc' \"cde\", 'mno' \"xyz\",";
how can I use the c.Replace(???, ???) method to have this string:
"'abc' "cde", 'mno' "xyz","
that is, all the...
|
by: Chris Anderson |
last post by:
Anyone know of a fix (ideally) or an easy workaround to the problem of escape characters not working in regex replacement text? They just come out as literal text
For example, you'd think that thi...
|
by: jgabbai |
last post by:
Hi,
What is the best way to white list a set of allowable characters using
regex or replace? I understand it is safer to whitelist than to
blacklist, but am not sure how to go about it.
Many...
|
by: channu |
last post by:
Hi
I am beginner in c++ coding.I want to read a text file and replace
commas and space with tabs.
Can any buddy help me out.
Thanks
Channu
|
by: MP |
last post by:
Hi
trying to begin to learn database using vb6, ado/adox, mdb format, sql
(not using access...just mdb format via ado)
i need to group the values of multiple fields
- get their possible...
|
by: Warren Moxley |
last post by:
Hi there, i've been searching for a C String search and replace
function. I need to find all occurrences of " " in a char* array, and
replace them with another char, I know how to do this in...
|
by: Lonifasiko |
last post by:
Hi,
Just want to replace character at index 1 of a string with another
character. Just want to replace character at that position. I thought
Replace method would be overloaded with an index...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |