我有这个c#代码
namespace ZumaApp
{
public partial class _Default : System.Web.UI.Page
{
ServiceReference1.QSLWebBookingSoapClient services;
public String CallerId = "";
public Int32 rowCount;
protected void Page_Load(object sender, EventArgs e)
{
CallerId = Request["CallerID"];
在我的 asp 中我有这个:
<%@ Page Title="VMP Online Booking" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ZumaApp._Default" %>
我的问题
页面加载函数没有执行。
我怎么知道的
首先:我在 Page_Load 函数的第一行打了一个断点,但 visual studio 并没有在断点处停止。
第二:我在这一行 public String CallerId = "";
处打断点,然后 Visual Studio 停在该行,然后我按 step over
但是页面无需调用 Page_Load 函数即可加载。
我试过清理和重建但没有帮助
最佳答案
试试这个
<%@ Page Title="VMP Online Booking" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeBehind="_Default.aspx.cs" Inherits="ZumaApp._Default" %>
关于c# - Page_Load在asp.net中没有执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22558445/