I don't expect this to be a problem unless you are doing a bunch of Ajax requests when your page loads and/or your page is really complex.
If you have an issue it's best to look at what happens (for example use F12 and you have tabs to check http, JavaScript and rendering performance) rather than just reading the code and wondering if it is slow.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
399 Points
1101 Posts
will this fuction cause my page load slow
Jul 03, 2017 06:40 PM|asp.ambur|LINK
Hello
I have my aspx using master page
in master page i have written this below
aspx code
Will this cause to load my page slow if no its okay
If yes then what is the best other method to call this and where?
All-Star
48300 Points
18003 Posts
Re: will this fuction cause my page load slow
Jul 03, 2017 06:56 PM|PatriceSc|LINK
Hi,
I don't expect this to be a problem unless you are doing a bunch of Ajax requests when your page loads and/or your page is really complex.
If you have an issue it's best to look at what happens (for example use F12 and you have tabs to check http, JavaScript and rendering performance) rather than just reading the code and wondering if it is slow.
Contributor
6730 Points
2715 Posts
Re: will this fuction cause my page load slow
Jul 04, 2017 07:12 AM|Eric Du|LINK
Hi asp.ambur,
According to your code and code, I suppose this is only add a value to the element property, this should not consume more time.
So my suggestion is check the execution time of this function or other function, this will better help you found out what cause your page load slow.
Here are two methods to check the function execute time, please check:
How to measure time taken by a function to execute:
https://stackoverflow.com/questions/313893/how-to-measure-time-taken-by-a-function-to-execute
Calculate the execution time of a method [duplicate]:
https://stackoverflow.com/questions/14019510/calculate-the-execution-time-of-a-method
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.