asp.net中的网页. [英] webpage in asp.net.

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

问题描述

我已经在asp.net中创建了网页.
当我在Google中打开网页时,它会通过网页上的以下错误进行复制.

此页面包含以下错误:
第54行第54列的错误:未定义TextBox上的命名空间前缀asp
第58行第58列的错误:未定义Button上的命名空间前缀asp
下面是直到第一个错误的页面呈现.

I have created webpage in asp.net.
When I open page in google crom it through following error on webpage.

This page contains the following errors:
error on line 46 at column 54: Namespace prefix asp on TextBox is not defined
error on line 60 at column 58: Namespace prefix asp on Button is not defined
Below is a rendering of the page up to the first error.

推荐答案

尝试此操作
用于按钮
try this
For button
<asp:Button ID="Button1" runat="server" Text="Button" />


对于文本框


For Textbox

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>


似乎您尝试在浏览器中打开源代码.aspx页面.你做不到;这个不成立.您需要通过启用ASP.NET的HTTP服务器访问此页面.

ASP.NET是服务器端技术.如果您不了解,我现在就知道您在开发什么;大概什么都没有.

您可以做两件事:

1)通过Visual Studio运行Web应用程序.在开发HTTP服务器上查看您的URL.它应该看起来像"http://localhost:[端口号] ..."或具有本地IP地址而不是"localhost".在Chrome中打开相同的UTL.

2)运行您的Web应用程序.在Web浏览器中,使用查看页面源"或另存页面为".将页面保存在本地.它将采用Web浏览器看到的形式.使用Chrome打开它并进行测试,但是所有动态功能当然都无法使用.

但是首先,请充分了解HTTP的工作原理,服务器和客户端的工作方式等.

—SA
It looks like you try to open the source code .aspx page in the browser. You cannot do it; it makes no sense. You need to access this page through ASP.NET-enabled HTTP server.

ASP.NET is server-side technology. If you don''t understand it, I would now know what are you developing; probably nothing.

You can do two things:

1) Run your Web application through Visual Studio. Look at your URL at the development HTTP server. It should look like "http://localhost:[port#]..." or have local IP address instead of "localhost". Open the same UTL in Chrome.

2) Run your Web application. In the Web browser, use "View Page Source" or "Save Page As". Save the page locally. It will be in the form seeing by a Web browser. Open it with Chrome and test, but all dynamic functionality would not work, of course.

But first of all, please get full understanding on how HTTP works, what server and client side do, etc.

—SA


这篇关于asp.net中的网页.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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