Page_Load没有运行! [英] Page_Load not running!

查看:79
本文介绍了Page_Load没有运行!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Howdy


我的以下脚本根本没有处理!


< script runat =" server">

Sub Page_Load(发件人为Object,e为EventArgs)

lblWelcome.text =" hello"

End Sub

< / script>


但是,onclicks等功能正常工作


谢谢!

-

David Lozzi

网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(删除-this)@ delphi-ts.com

解决方案

我认为我修好了它。第一行是:


<%@ Page Language =" vb" AutoEventWireup = QUOT假QUOT;代码隐藏= QUOT; home.aspx.vb" Inherits =" orcas.myvnc.com.home"%>


我删除了


AutoEventWireup =" false"


它工作正常。这个是来做什么的?我正在使用VS.Net。


谢谢!


-

David Lozzi
网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(remove-this)@delphi-ts.com

David Lozzi < dlozzi(删除-此)@ delphi-ts.com>在留言新闻中写道:eB ************** @ TK2MSFTNGP11.phx.gbl ...

你好


我的以下脚本根本没有处理!


< script runat =" server">

Sub Page_Load(发件人为Object,e为EventArgs) )

lblWelcome.text =" hello"

End Sub

< / script>


但是,onclicks等功能正常工作


谢谢!

-

David Lozzi

网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(remove-this)@delphi-ts.com

尝试添加:

language =" vb"

到脚本标签

David Wier

MCP,MVP ASP.NET,ASPInsider
http://aspnet101.com

即将推出 - 数据管理工具包

管理MSDE / SQL Server / MySQL / MS Access数据库来自一个位置。
http: //augustwind.com/augustwind/dmt.aspx
http://aspexpress.com

David Lozzi < dlozzi(删除-此)@ delphi-ts.com>在留言新闻中写道:eB ************** @ TK2MSFTNGP11.phx.gbl ...

你好


我的以下脚本根本没有处理!


< script runat =" server">

Sub Page_Load(发件人为Object,e为EventArgs) )

lblWelcome.text =" hello"

End Sub

< / script>


但是,onclicks等功能正常工作


谢谢!

-

David Lozzi

网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(remove-this)@delphi-ts.com

嗯,你做错了几件事。您说您的页面应该使用Codebehind,并且您正在编写Page_Load处理程序的内联代码。所以,将Page_Load处理程序放在home.aspx.vb代码后面的文件中。当AutoEventWireup为true时,表示典型的页面事件会自动连接到相应的处理程序。因此,您的页面能够找到Page_Load,这是Load的典型处理程序。事件。这就是它的工作原理。如果将它设置为false,则没有指定Load事件的处理程序,因此无需执行任何操作

-

Kumar Reddi
http://kumarreddi.blogspot.com

" David Lozzi" < dlozzi(删除-此)@ delphi-ts.com>在消息新闻中写道:uE ************** @ TK2MSFTNGP14.phx.gbl ...

我修好了,我想。第一行是:


<%@ Page Language =" vb" AutoEventWireup = QUOT假QUOT;代码隐藏= QUOT; home.aspx.vb" Inherits =" orcas.myvnc.com.home"%>


我删除了


AutoEventWireup =" false"


它工作正常。这个是来做什么的?我正在使用VS.Net。


谢谢!


-

David Lozzi
网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(remove-this)@delphi-ts.com

David Lozzi < dlozzi(删除-此)@ delphi-ts.com>在留言新闻中写道:eB ************** @ TK2MSFTNGP11.phx.gbl ...

你好


我的以下脚本根本没有处理!


< script runat =" server">

Sub Page_Load(发件人为Object,e为EventArgs) )

lblWelcome.text =" hello"

End Sub

< / script>


但是,onclicks等功能正常工作


谢谢!

-

David Lozzi

网络应用程序/网络专家

德尔福技术解决方案公司

dlozzi(remove-this)@delphi-ts.com

Howdy

My following script is not processing at all!

<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
lblWelcome.text = "hello"
End Sub
</script>

However, functions with onclicks, etc. work fine

thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com

解决方案

I fixed it, i think. In the first line is this:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="home.aspx.vb" Inherits="orcas.myvnc.com.home"%>

I removed

AutoEventWireup="false"

and it worked fine. What is this for? I''m using VS.Net.

thanks!

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:eB**************@TK2MSFTNGP11.phx.gbl...
Howdy

My following script is not processing at all!

<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
lblWelcome.text = "hello"
End Sub
</script>

However, functions with onclicks, etc. work fine

thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


Try adding :
language="vb"
to the script tag
David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
Coming Soon - Data Management Toolkit
Manage MSDE/SQL Server/MySQL/MS Access Databases from one location.
http://augustwind.com/augustwind/dmt.aspx
http://aspexpress.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:eB**************@TK2MSFTNGP11.phx.gbl...
Howdy

My following script is not processing at all!

<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
lblWelcome.text = "hello"
End Sub
</script>

However, functions with onclicks, etc. work fine

thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


Hmm you are doing couple of things wrong. You said your page should use Codebehind, and you are writing the inline code for the Page_Load handler. so, place the Page_Load handler in the home.aspx.vb code behind file. When you have AutoEventWireup to true, it means the typical page events are wired up to the corresponding handlers automatically. So, your page is able to find Page_Load, which is the typical handler for "Load" event. Thats why it works. When you have it set to false, there is no handler for Load event specified, so nothing to execute
--
Kumar Reddi
http://kumarreddi.blogspot.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:uE**************@TK2MSFTNGP14.phx.gbl...
I fixed it, i think. In the first line is this:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="home.aspx.vb" Inherits="orcas.myvnc.com.home"%>

I removed

AutoEventWireup="false"

and it worked fine. What is this for? I''m using VS.Net.

thanks!

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:eB**************@TK2MSFTNGP11.phx.gbl...
Howdy

My following script is not processing at all!

<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
lblWelcome.text = "hello"
End Sub
</script>

However, functions with onclicks, etc. work fine

thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


这篇关于Page_Load没有运行!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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