duftstenen
IS-IT--Management
Hi everyone,
A question regard finding best practice when working with content pages in Master Page keeps annoying me.
Let’s say I have created a Master Page with the design and proper <asp:ContentPlaceHolder>s and a Content page which contains <asp:Content> etc. The MasterPage contains a ContentPlaceholder which display all the text; it’s called “Main”. When the page (Default.aspx) loads for the first time a welcome message is displayed, defined in <asp:Content> for “Main”. When a button is clicked on Default.aspx and the Button_Click method is fired, it should remove the text and make some other html layout, run some method and display the result. I have looked into the possibility to have different <asp:content> which I can choose with some Visible true/false after the button click, but this doesn’t seems the right way to do. Neither is it to clear all current content and build it up with let’s say .InnerHtml etc.? What is the best practice in this matter?
Best regards
Duftstenen
A question regard finding best practice when working with content pages in Master Page keeps annoying me.
Let’s say I have created a Master Page with the design and proper <asp:ContentPlaceHolder>s and a Content page which contains <asp:Content> etc. The MasterPage contains a ContentPlaceholder which display all the text; it’s called “Main”. When the page (Default.aspx) loads for the first time a welcome message is displayed, defined in <asp:Content> for “Main”. When a button is clicked on Default.aspx and the Button_Click method is fired, it should remove the text and make some other html layout, run some method and display the result. I have looked into the possibility to have different <asp:content> which I can choose with some Visible true/false after the button click, but this doesn’t seems the right way to do. Neither is it to clear all current content and build it up with let’s say .InnerHtml etc.? What is the best practice in this matter?
Best regards
Duftstenen