473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need Help Manipulating Strings (Remove/Replace)

Hi.

How Do I "UPDATE" a previously created string?
I have a problem where an XML string created in
an event handler fails because the string doesn't "UPDATE"
each time the event hanlder fires, but "APPENDS",
creating lots of repetition in the XML:

Quote:
XML Parsing Error: junk after document element

Location: http://localhost:5223/Presentation/set/progress.aspx
Line Number 1, Column 191:<?xml version='1.0' encoding='ISO-8859-1'?
><uploads><upload><filename>SomeVideo.gvi</filename><bytessent>0</
bytessent><filesize>12444894</filesize><percent>0</percent></upload></
uploads><?xml version='1.0' encoding='ISO-8859-1'?...

and, the built string inside the event handler method
looks like this:

Code:

Dim sbhtml As New System.Text.StringBuilder
sbhtml.Append("<Some XML Tag>")
etc...
Context.Response.ContentType = "text/xml"
Response.Write(sbhtml.ToString)

So, how do I update the string each time the event handler
fires, not append more xml to the recently created string?

Thanks.
Peter

Mar 16 '07 #1
1 917
You might try calling Response.Clear before your do your
Response.Write.

========================
Clay Burch
Syncfusion, Inc.

Mar 17 '07 #2

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

Similar topics

5
by: Gary McCullough | last post by:
What I want to do sounds simple, but it's defeating me. I want to substitute all occurences of a colon : character in a string with an @ character -- unless the : occurs within a single or...
10
by: Segfahlt | last post by:
I have a fairly simple C# program that just needs to open up a fixed width file, convert each record to tab delimited and append a field to the end of it. The input files are between 300M and...
2
by: Roshawn Dawson | last post by:
Hi, Web sites, like Google, have the ability to remove certain common words from the users search. For example, if I were to type "php and .net", Google would remove the word "and." So, that...
3
by: Serge Rielau | last post by:
Hi folks, One the more frequently asked questions is how to "sum" up strings by virtue of concatenating them in an aggregate function. Her eis a rather simpel solution that may be worth sharing...
7
by: Chris Brat | last post by:
Hi, Is there a better way to replace/remove characters (specifically ' and " characters in my case, but it could be anything) in strings in a list, than this example to replace 'a' with 'b': ...
43
by: Frodo Baggins | last post by:
Hi all, We are using strcpy to copy strings in our app. This gave us problems when the destination buffer is not large enough. As a workaround, we wanted to replace calls to strcpy with strncpy....
7
by: pbd22 | last post by:
Hi. How Do I "UPDATE" a previously created string? I have a problem where an XML string created in an event handler fails because the string doesn't "UPDATE" each time the event hanlder fires,...
4
by: JJ | last post by:
Is there a way of checking that a line with escape sequences in it, has no strings in it (apart from the escape sequences)? i.e. a line with \n\t\t\t\t\t\t\t\r\n would have no string in it a...
3
by: =?Utf-8?B?UGF1bCBXdQ==?= | last post by:
I need to replace the ascII strings in VC++ source code with unicode compatiable strings. That is I want to replace "abc" with _T("abc") excluding the strings in #include line or already in...
7
by: ojsimon | last post by:
Hi I found this script on a forum and have been trying to make it work, but all it returns is a blank screen, i tried using the debug error reporting but got nothing from that either just a blank...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
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...

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.