response write into div

Hi experts

I have a webpage where i do this:

<body style="background-color: #D2DADC" onload="runscripts()">
    <form id="form1" runat="server">
    <!-- #Include File="topdesign.aspx" -->
    <div class="divtekstbody" id="mainarea">
    <!-- #Include File="bunddesign.aspx" -->

the include files contains my general design, and it works like a charm. But on the server side i try to do this:
Response.Write("<a href='pictures.aspx?lag=" + strfolderlink + "'>" + arrfolders[u].ToString() + " / " + "</a>");
and that works as well, but, but the response write function are placing my code before <!-- #Include File="topdesign.aspx" --> and i want the code between my include file topdesign and bunddesign. Then i was thinking if you could make the response write to place the code inside a DIV?

Can some one help me with a solution?
Who is Participating?
DCRAPACCESSConnect With a Mentor Author Commented:
Stupid me, I just need to add runat="server" to my div :-)
Hi, you can create a custom control place it in there wherever you want,  handle its render event, use the html writer object to write first the <div> tag and then write your stuff in it again using the writer object and close the div tag again by letting writer write '</div>' at the end.

DCRAPACCESSAuthor Commented:
Sorry i don't really understand your answer, can you write an example?
DCRAPACCESSAuthor Commented:
sorry for the trouble!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.