Pass data from a ASP.NET page to ASCX user controls loaded dynamically

前端 未结 6 1891
鱼传尺愫
鱼传尺愫 2020-12-08 05:05

I\'m developing an ASP.NET application with C# and Ajax.

I have a page that holds user controls loaded dynamically. I need to pass some data (integer values and some

6条回答
  •  一向
    一向 (楼主)
    2020-12-08 05:18

    You could set values in the HttpContext.Items collection and read them in your controls. This is like using Session except that it's only available per request not for the whole session lifetime.

    http://www.4guysfromrolla.com/articles/060904-1.aspx

    IMHO this is a bit lazy but it might be a good solution in some situations.

提交回复
热议问题