Is there a wap version of your site?
user control caching question
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > .Net Development > user control caching question 24 June 2004 02:46:10

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

user control caching question

Jeff 24 June 2004 02:46:10
 I have a user control I use for building page specific Meta tag info. I
am caching the control using the VaryByParam option. Once I added the
caching, the aspx page that uses it started erring out. I tracked it
down to the fact that I am trying to set properties of the user control
dynamically in the aspx page that uses it. However, once cached, the
reference to the user control appears to be null, so I had to do
something like this in my aspx page:

Page_Load:


If (headercontrol != null) //will be null if currently cached
{
//set the properties here.
}


Is this normal? I guess maybe I could have gotten around this by setting
the properties from within the aspx page instead where I declare the
control. I guess I could have done something like
<myControl:MetaTags­ Runat="Server" ID="MetaTags" Prop1=GetProp1
Prop2=GetProp2 />

I am guessing that this would work because the aspx page would know when
not to load this or not?

TIA.




===================­================
This list is hosted by DevelopMentor http://www.develop.­com
NEW! ASP.NET courses you may be interested in:

Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.­com/courses/gaspdotn­etls

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > .Net Development > user control caching question 24 June 2004 02:46:10

see also:
Convert DATETIME YEAR TO FRACTION to…
IDS 10.0 32-bit and PAM
Problem with recursive SPL procedure
пройди тесты:
see also:
please tell me how to create TABLE in…
real ventures
sell electronic such as nokia n95,apple…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .