Asp.net is object-oriented rather than procedure-oriented. Instead of
manipulating the order of creation, you should rather manipulate with
properties like this:
control1([some property that affects the content])=[some code that returns
the content depending on mode]
control2([some property that affects the content])=[some code that returns
the content depending on mode]
Depending on your page layout and other considerations, you can use
placeholders, or iframes, or something else. You have quite a choice here.
In any case you have to be patient with asp.net and be ready to learn.
Possibly you should follow the suggestions you heard. Shortcuts usually lead
to incorrect or inefficient solutions.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
<ni**********@l exisnexis.comwr ote in message
news:11******** **************@ 73g2000cwn.goog legroups.com...
>I need to include to static html files in my asp.net page. The order of
include depend on query string. Here is the pseudo code
mypage.aspx:
<%
string mode = Request["mode"];
if (mode == "A") {
include("file1. html"); // How to do this?
include("filee2 .html");
} else {
include("file2. html");
include("filee1 .html");
}
%>
How can I do this? I heard some suggestion of using User controls and
PlaceHolder controls and do this in the code behind file. I just feel
that is overkill. Is there any simple way to do this in the aspx file
without using the code behind file?
I am new to ASP.NET, so please give me the code snippet with correct
syntax instead of pseudo code.
Thanks