如何将值从标题传递到主页 [英] how to pass values from header to main page

查看:84
本文介绍了如何将值从标题传递到主页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用母版页眉(用户控件).我在内容页中使用了一个下拉列表,并且在页眉中使用了一个按钮.我需要两个无法在@server上运行的表单标签.
我正在通过公共属性访问标头上文本框的值,出于搜索目的,我需要此值,关于代码,我如何实现此目的还有其他方法吗?

I am using master page a header(user control).I am using one dropdownlist in content page and a button in header .i need two form tags run @ server that is not possible.
I am accessing the value from of textbox on header through public property, I need this value for search purpose, on codebehind how I can achieve this is there any other way?

推荐答案

您是正确的,在asp.net中,runat = server不能有两种形式.问题是为什么您需要两种形式,或者如果控件相互依赖,为什么控件不能在同一个用户控件中.看来您需要重新考虑您的设计
You are correct, in asp.net you can''t have two forms with runat=server. The question is why you need two forms or why the controls can''t be in the same user control if they rely on each other. It seems you need to rethink your design


这篇关于如何将值从标题传递到主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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