你好朋友!我想在asp.net web项目中创建一个谷歌搜索框... [英] Hello Friends! I want to create a google search box in asp.net web project...

查看:67
本文介绍了你好朋友!我想在asp.net web项目中创建一个谷歌搜索框...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在asp.net web项目中创建一个Google搜索框...但是当我尝试创建它时...它显示一个警告,表单元素不能嵌套在表单Tag ..它是什么。 ..

I want to create a Google search box in asp.net web project...but when i trying to create it..It shows a warning that a form element cannot be nested in a form Tag..What is it...

推荐答案

您可以尝试在另一个标签页或弹出框中打开谷歌搜索页面。

You could try to open the google search page in another tab or popup.
<script>window.open("www.google.com");</script>


如果没有显示您的代码,则无法准确回答。从错误中你已经包含了第二个标记。您无法在Web表单中执行此操作。必须只有一个表格标签。



看看这篇文章的帮助。



http://dotnetslackers.com/articles/aspnet/Implementing-Search- in-ASP-NET-with-Google-Custom-Search.aspx [ ^ ]
With out showing your code it is impossible to answer accurately. From the error you have included a second tag. You cannot do this in web forms. There must only be one form tag.

Look at this article help.

http://dotnetslackers.com/articles/aspnet/Implementing-Search-in-ASP-NET-with-Google-Custom-Search.aspx[^]


Quote:

表单元素不能嵌套在表单标签中。

form element cannot be nested in a form Tag..

这意味着Google搜索代码具有表单标签,您将其放置在页面的默认表单标签内。这就是问题。



因此,它不能以这种方式使用两种形式。

That means the Google Search code is having form tags which you are placing inside the default form tags of the page. That is the issue.

So, it can't work this way with two forms.


这篇关于你好朋友!我想在asp.net web项目中创建一个谷歌搜索框...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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