English 中文(简体)
视觉演播室为何有时会增加一些在密码背后创建网页的活动?
原标题:Why does Visual Studio sometimes add a number when creating page events in codebehinds?

在为伙伴关系撰写视频演播室的密码时。 互联网网络是应用,我常常利用窗口顶端的倒数来使网页处理器自动化(例如,第1页-Load,第1页)。 我注意到,有时视像演播室喜欢在“Page_Load1”或“Page_PreRender2”等功能名称上添加数字。

从方案角度看,这不会对守则产生影响。 但奇怪的是,我认为这只是一个bit。 是否有办法消除这种行为?

问题回答

如果活动手已经存在,但与活动脱节,安全局将这样做。

你们可以照样照搬这一行为。

  • 1. 创建一种只有 but子的表格(除布顿1号缺省名称外)

  • • 制作双芯片,以制造Button1-Click

你们可能不认识到的是,除了编码背后外,还有设计人和物权人档案。 我不敢确定谁有什么,我不是在有视力演播室的PC中,而是在其中一个档案中,有一套界定 but的法典,包括一条从来的线。

Button1。 Click +=新活动Handler

或大致如此。

现在情况良好。 NOW to dislink the Itton from the event...

  • In the form designer, delete the button

目前,Button1-click事件手稿仍以背书的形式存在,但与一项活动没有关联(因为与事件相关的纽顿语已经删除)。

  • Drag a new button onto the form (still named Button_1)

此时此刻,布特顿有1号新规定,但活动手仍与你原来的布顿1-Click活动没有关系。 因此,如果你在纽芬兰制造双筒浮标,将设立新的事件手(Button1_Click1(1))

我假定会发生这种情况,因为你已经采用一种名为<代码>Page_Load的现行方法: 视觉演播室必须区分现有的方法和新的方法。

请注意,如果你去除一个事件的手稿,视力演播室只有在空闲的情况下才删除该密码背后文档中的方法:如果你修改了该代码,它就从密码背后的文件中取出。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签