474,047 Members | 35,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Write Placement

Ron
Hi,
I currently am generating a report by to my end user by retrieving data from
my back end DB
and concatenating strings together and place this string concatenation
within a Label control.

I am finding some efficiencies issues and would like to use Response.Write( )
and stream this information directly
to the aspx page. All of my code is in the code behind and i would like to
keep it there.

How can i place the Response.Write stream in the Label control?
And is this possible.

Thanks,
Ron
May 2 '06
10 1945
Did you try using the StringBuilder? StringBuilder is not the same as string
concatenation and was designed to avoid the problems associated with typical
string concat performance.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Ron" <Ro*@discussion s.microsoft.com > wrote in message
news:48******** *************** ***********@mic rosoft.com...
The problem is the size of the reports that are built form the DB
currently
we have been using the string concats method but we are have a lot of
issues
with timeouts. Thats why i would like to use Response.Write.

"Swanand Mokashi" wrote:
I would suggest using the StringBuilder class to concat strings -- it is
a
lot more efficient than just string concats :

str1 = str1 + "test 1";

In this case 3 string objects are created where as if you use
StringBuilder
, it uses a buffer :

System.Text.Str ingBuilder str = new System.Text.Str ingBuilder();
str.Append("tes t 1");

you can also use the AppendFormat method if you want to format the
string
that is being appended

HTH
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics. com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Ron" <Ro*@discussion s.microsoft.com > wrote in message
news:E7******** *************** ***********@mic rosoft.com...
> Hi,
> I currently am generating a report by to my end user by retrieving data
> from
> my back end DB
> and concatenating strings together and place this string concatenation
> within a Label control.
>
> I am finding some efficiencies issues and would like to use
> Response.Write( )
> and stream this information directly
> to the aspx page. All of my code is in the code behind and i would like
> to
> keep it there.
>
> How can i place the Response.Write stream in the Label control?
> And is this possible.
>
> Thanks,
> Ron


May 5 '06 #11

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

Similar topics

23
4517
by: Giancarlo Niccolai | last post by:
Hello all. I have peeked through the FAQ and all relevant links, and also through Stroustrup book, but I have not been able to find an answer, so I have to post here as a last resort. It makes sense that if you have virtual destructors, they are eventually used in the explicit destructor call when using the placement new semantic: class A {
20
4184
by: Ioannis Vranos | last post by:
When we use the standard placement new operator provided in <new>, and not a definition of owr own, isn't a call to placement delete enough? Consider the code: #include <new>
8
1918
by: elviin | last post by:
Hello. I tried a sample programm using placement new. I am not sure if i understand this technique correctly. I do not mean usage but a real world application. Could anyone to describe some applications where it gives reason to use placement new? My doubts come from my consideration that if I delete an object (e.g. 50MB) then system can allocate this chunk of memory to another process and my process will not be able to re-use this...
15
4695
by: mangesh | last post by:
This code is from c++ faq in section 11 : void someCode() { char memory; void* p = memory; Fred* f = new(p) Fred(); f->~Fred(); // Explicitly call the destructor for the placed object }
1
11493
by: SarahT | last post by:
Hi folks, I am doing something Very Bad and Wrong (which I'll spare you the details of) that requires overloading new for some specific classes. So, for example: class MyWeirdThingy { public: ...
15
5071
by: LuB | last post by:
I am constantly creating and destroying a singular object used within a class I wrote. To save a bit of time, I am considering using 'placement new'. I guess we could also debate this decision - but for the sake of this post ... I'm searching for an answer that assumes said decision. If I allocate memory in the class declaration: char buffer;
9
3314
by: karthikbalaguru | last post by:
Hi, I find that articles stating that 'placement new' constructs an object on a pre-allocated buffer and so takes less time. Actually, we have to consider the allocation of the buffer and then the construction of object using 'placement new'. So, Effectively it should be taking more time . What do you think ? I think,
0
12152
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11607
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...
1
12042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10320
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...
0
6665
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
6846
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5427
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
4950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3980
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.