asp.net - Performance difference of code in aspx and cs files for showing and hiding a control dynamically -


i thinking performance when use code hide control in aspx page using delimiters or in cs file.

for e.g. if have panel , want shown following condition, can achieve 2 ways

1: using code in aspx file, this

<% if(isallowed) { %>  <asp:panel ...></asp:panel>  <% } %> 

2: in code file, this

<asp:panel id="pnlmypanel" visible="false"></asp:panel> 

and in cs file

if(isallowed)   pnlmypanel.visible=true; 

in view, first way should not @ create panel in page. correct here?

please guide me method preferable

honestly have no idea quicker, doubt difference have appreciable effect on performance of application.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -