从嵌套的用户控件访问EntityDataSource [英] Accessing EntityDataSource from nested user controls

查看:55
本文介绍了从嵌套的用户控件访问EntityDataSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在ascx页面上有一个EntityDataSource,我想访问并使用它在该控件的子ascx上返回的数据。 有人能指出我如何实现这一目标吗?


谢谢。 

解决方案

您好,


我想您为项目创建了一个数据模型。实际上,您可以直接在子ascx页面中使用数据模型,而不是在当前页面中使用EntityDataSource。 这种解决方法听起来不错吗?


祝你好运


Hi,

I have an EntityDataSource on an ascx page and I would like to access and use the data it returns on a child ascx of that control.  Can someone point me to how this can be achieved?

Thanks. 

解决方案

Hello,

I suppose you create a data model for your project. In fact, instead of using the EntityDataSource in your current page, you could use the data model directly in your child ascx page. Does this workaround sound good?

Best regards


这篇关于从嵌套的用户控件访问EntityDataSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆