Asp.Net嵌套表格 [英] Asp.Net nested form

查看:411
本文介绍了Asp.Net嵌套表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为一个asp.net web的表单网站内的搜索提供一个HTML表单(而不是服务器的形式)。该表格​​将张贴到执行索引搜索其他网站。眼见为嵌套形式并不在asp.net中很好地工作,什么是最简单的方法为这个?

嵌套形式是执行获取针对搜索网站,我没有编程控制一个简单的HTML表单。

更新:我通过简单的服务器形式移动到适当的位置在页面上,而不是它环绕整个页面解决了我的问题。不过,我仍然不知道如何,如果HTML表单需要进行服务器控件(这要求服务器的形式)之间的物理放置在此将进行处理。


解决方案

  

不过,我仍然不知道如何,如果物理服务器控件(这要求服务器的形式)之间放置所需的HTML表单这将被处理。


您可以将控制在页面上,而不需要的HtmlForm。

在你的情况有没有问题,宣布另一种形式的标记,但你也可以只使用主窗体的一些搜索的控制,并使其发出GET到该网站。

I need to supply an html form (not a server form) for searching within an asp.net web-forms website. The form will post to another website where an indexed search is performed. Seeing as nested forms don't work well in asp.net, what is the simplest approach for this?

The nested form is a simple html form that performs a "get" against the search website, which I do not have programmatic control over.

Update: I resolved my issue by simply moving the server form to the appropriate place on the page, rather than having it surround the entire page. However, I'm still wondering how this would be handled if the html form needed to be placed physically between server controls (which require the server form).

解决方案

However, I'm still wondering how this would be handled if the html form needed to be placed physically between server controls (which require the server form).

You can place controls on your page without requiring an HtmlForm.

In your case there's no issue declaring another form markup, but you could also just use some search control on your main form and make it issue a GET to that website.

这篇关于Asp.Net嵌套表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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