I have a create-quote.aspx page. I want to open this page in different modes, depending on whether the querystring parameter is present or not.
My question is which event should be checked if I have a querystring parameter or not. I think it should be despised what you say.
Probably the best choice is to handle them on the Page_Load event:
http://msdn.microsoft.com/en-us/library/ms178472.aspx#lifecycle_events
You're right. You must check the request in the preinit event. Before initialization, the start phase begins, where request request objects are created.
Link: http://msdn.microsoft.com/en-us/library/ms178472.aspx
I would check that there is something like this in the Page_Load event:
Page_Load { if(!Page.IsPostback) { if(Request.QueryString["id"] != null) { // do whatever with the id value } } }
Source: https://habr.com/ru/post/1309664/More articles:What does it mean that a language is "interpreted"? - compiler-constructionphp: exception handling in exception handlers? - phpHow can I create a curve editor that works well with the WPF model? - c #Windows batch file to delete folders / subfolders using wildcards - batch-fileTomcat Http and Https on the same port - javaJFace ErrorDialog: how do I show something in the details? - javaTips / suggestions for my first project PHP classes - functionHow can I select a child node programmatically in dynatree? - javascriptBest practice for unit testing? / C # InternalsVisibleTo () for VBNET 2.0 during testing? - c #Best way to generate text patterns from a PHP array having 3 columns (id, path, name)? - phpAll Articles