Groups | Blog | Home
all groups > asp.net webcontrols > july 2003 >

asp.net webcontrols : Caching of dynamic loaded usercontrols


Sven Schimmel
7/31/2003 9:05:12 AM
Hello,

I load usercontrols dynamically and bind them to
placeholders, depending on the querystring. If I add an
Caching-Tag in the UserControl I load dynamically I get an
error. Is there a way to cache dynamic loaded usercontrols
like a Usercontrol which displays the news.

Thanks for your help

Sven


jan v
7/31/2003 6:13:06 PM
Overload the unique ID and viewstate will kick in making you're control act
lika a normal one.

Do you have any idea of how to solve my problem?

----------
hi,

im trying to get a dynamic questionnaire running on asp.net. But i get a
stack overflow exception.

this is my code, in the tblQuestions datatable there are only 4 datarows.
foreach (DsQuestionList.tblQuestionsRow dr in
this.dsQuestionList.tblQuestions.Rows)

{

Questions q = new Questions();


q.questionID =
int.Parse(dr[this.dsQuestionList.tblQuestions.QuestionIDColumn].ToString());

this.plhQuestions.Controls.Add(q);

}



now when i do

this.plhQuestions.Controls.Add(LoadControl("Questions.asx"));

i does display the 4 controls but this way i cant set the ID of the question
he has to show.

plhQuestions (is a placeholder control)

Does anyone have an idea?

my e-m-a-i-l is (whithout the dashes) v-e-r-c-a-u-t-e-r-e-n@flashmail.com
(vercauteren ) i will check back in theis newsgroup.



Thank you

-----------------



[quoted text, click to view]

AddThis Social Bookmark Button