如何在asp.net和c#中创建另一个表单作为对象 [英] How to Create another form as object in asp.net and c#

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

问题描述

如何在asp.net中创建一个对象,如此Form2 f = new form2()...另一个表单名称无法在表单中声明..请帮助我..

解决方案

网站不使用表单 - 它们使用页面,并且您不会以这种方式在它们之间切换,因为整个架构是不同的。



因此,如果您使用的是ASP.NET,则需要重新考虑您正在做的事情:表单不是要走的路。


引用:

我需要一个gridview值到另一个表单文本框..

根据你的意见回答



您可以使用QueryString将Gridview Value传递给另一个页面并分配给TextBox控件。



http://stackoverflow.com/questions/17189798/selecting-a-row-in- GridView控件,然后通过来最selected-行到另一页



http://stackoverflow.com/questions/5393942/passing-value-when-select-on-gridview-to-another-page [ ^ ]


How can i create one object in asp.net like this Form2 f=new form2()... another form name is can't declared in the form.. Pls Help me..

解决方案

Web sites don't use forms - they use pages, and you don't switch between them in that way because the whole architecture is different.

So if you are using ASP.NET, you need to rethink what you are doing: forms are not the way to go.


Quote:

I need one gridview value to another form text box..

Answering as per your comments

You can use QueryString to pass Gridview Value to another page and assign to the TextBox Control.

http://stackoverflow.com/questions/17189798/selecting-a-row-in-gridview-then-passing-the-selected-row-to-another-page

http://stackoverflow.com/questions/5393942/passing-value-when-select-on-gridview-to-another-page[^]


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

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