如何在asp.net中创建新表单 [英] How to create new form in asp.net

查看:87
本文介绍了如何在asp.net中创建新表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vb.net中,我正在使用以下代码访问另一个表单控件

In the vb.net I am using following code for access another forms control

dim rrview as new frmReportViewer
rrview.CrystalReport1.DisplayGroupTree = False
rrview.MdiParent = MyBase.MdiParent
rrview.Show()
rview.CRViewer.Zoom(90)



这样,我想使用C#访问asp.net中的另一个Webform控件.怎么做..

请帮帮我.

谢谢您.



Like this I want access another webform controls in asp.net with C#. How to do it..

Please help me.

Thank you

推荐答案

不要.这是一个坏主意,因为它将两种形式的内部设计联系在一起-如果不考虑任何更改对另一种形式(可能是未知的)的影响,就不能更改一种形式.使用公共属性和方法仅公开表单所需的部分-不是CrystalReport对象,而是方法ShowReport(false)ShowReport = false属性.
Don''t. It is a bad idea as it ties the two forms internal design together - you cannot change one without considering the affects of any changes on the other (possibly unknown) form. Use public properties and methods to expose only those parts of the form that it needs to - not a CrystalReport object, but a method ShowReport(false) or a ShowReport = false property instead.


这篇关于如何在asp.net中创建新表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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