Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > LiteralControl thread safety.

Reply
Thread Tools

LiteralControl thread safety.

 
 
George Ter-Saakov
Guest
Posts: n/a
 
      04-05-2004
Hi.

I have template solution. The Base page creates the main skeleton for the
page.

For that it adds bunch of LiteralControls in run time.

I am thinking of creating those controls only once(during initialization)
and then just add them to control collection.

I realize that every instance of the page will use the same instance of the
LiteralControl but since they only have static text i think it will be OK
and will save me some CPU ticks.

Is it ok? Any problem with this approach?

Thanks.
George.


 
Reply With Quote
 
 
 
 
Martin Dechev
Guest
Posts: n/a
 
      04-06-2004
Hi, George,

It will be easier to answer your question if you post some code.

Basically, everything that is not static (in VB shared) or constant field
gets created for each instance of the class. With the inheritance you avoid
writing the same code many times, but the code gets executed anyway.

Greetings
Martin
"George Ter-Saakov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi.
>
> I have template solution. The Base page creates the main skeleton for the
> page.
>
> For that it adds bunch of LiteralControls in run time.
>
> I am thinking of creating those controls only once(during initialization)
> and then just add them to control collection.
>
> I realize that every instance of the page will use the same instance of

the
> LiteralControl but since they only have static text i think it will be OK
> and will save me some CPU ticks.
>
> Is it ok? Any problem with this approach?
>
> Thanks.
> George.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Literal vs. LiteralControl vs. Label =?Utf-8?B?Sm9l?= ASP .Net 7 12-30-2008 04:22 PM
Terminating a thread from the main thread Charles A. Lackman ASP .Net 3 12-09-2004 02:12 PM
perl 5.8.2/3 - thread started by a thread pawo Perl 0 02-16-2004 01:18 PM
Difference between UI.LiteralControl and WebControls.Literal ? Andreas Klemt ASP .Net Web Controls 3 01-04-2004 11:28 AM
What is the difference between LiteralControl and Literal ? Andreas Klemt ASP .Net 1 01-03-2004 04:28 AM



Advertisments