[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4612
  • Last Modified:

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">
    </div>
    <!-- #Include File="bunddesign.aspx" -->
    </form>
</body>

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?
0
DCRAPACCESS
Asked:
DCRAPACCESS
  • 3
1 Solution
 
techExtremeCommented:
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.

0
 
DCRAPACCESSAuthor Commented:
Sorry i don't really understand your answer, can you write an example?
0
 
DCRAPACCESSAuthor Commented:
Stupid me, I just need to add runat="server" to my div :-)
0
 
DCRAPACCESSAuthor Commented:
sorry for the trouble!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now