page-lifecycle

On postback, how can I check which control cause postback in Page_Init event

风格不统一 提交于 2019-11-26 15:07:31
On postback, how can I check which control cause postback in Page_Init event. protected void Page_Init(object sender, EventArgs e) { //need to check here which control cause postback? } Thanks J Pollack I see that there is already some great advice and methods suggest for how to get the post back control. However I found another web page ( Mahesh blog ) with a method to retrieve post back control ID. I will post it here with a little modification, including making it an extension class. Hopefully it is more useful in that way. /// <summary> /// Gets the ID of the post back control. /// /// See

What is the &#39;page lifecycle&#39; of an ASP.NET WebForm? [closed]

你说的曾经没有我的故事 提交于 2019-11-26 09:06:44
问题 I\'m looking to get a more thorough understanding of the ASP.NET page lifecycle. I\'m in the process of building custom form controls and have found my knowledge in this area to be lacking. Are there any resources, tutorials, etc. that you\'ve used to better understand this area? Are there any tools you\'ve used to improve your knowledge in this area? 回答1: I've found this chart to be fairly useful. Provides a brief description as to what the piece is doing... John-Sheehan ASP.NET Life Cycle

ASP.NET page life cycle explanation

ⅰ亾dé卋堺 提交于 2019-11-26 07:26:56
问题 I was asked to explain the ASP.NET page life cycle in an interview some time back. I did explain it to him, but he was not satisfied with my answer. Could someone explain the life cycle to me please? 回答1: You can see: ASP.NET Page Life Cycle Diagram, The ASP.NET Page Life Cycle (by Solomon Shaffer) Microsoft Developer Network 回答2: There 10 events in ASP.NET page life cycle and the sequence is :- Init,Load view state,PostBackdata,Load,Validate,Event,Pre-render,Save view state,Render and Unload

On postback, how can I check which control cause postback in Page_Init event

一曲冷凌霜 提交于 2019-11-26 04:12:37
问题 On postback, how can I check which control cause postback in Page_Init event. protected void Page_Init(object sender, EventArgs e) { //need to check here which control cause postback? } Thanks 回答1: I see that there is already some great advice and methods suggest for how to get the post back control. However I found another web page (Mahesh blog) with a method to retrieve post back control ID. I will post it here with a little modification, including making it an extension class. Hopefully it