Including files ?!?

Results 1 to 2 of 2

Thread: Including files ?!?

  1. #1
    Join Date
    Dec 1969

    Default Including files ?!?

    Oke, after some years programming asp I decided to learn ASP.NET. I started a little project (for myself) in ASP.NET to learn and do something usefull....<BR><BR>But, Now I&#039;m stuck <BR>In asp it was simple to include another file by &#060;!-- include file --&#062; and it also worked in a function.<BR><BR>From what I learned about ASP.NET a function can&#039;t be placed within the &#060;% %&#062; section, but it must be placed in the &#060;script runat=server&#062; tag. Works fine. But.... Now I have a function that has to include another aspx file (99%HTML) where the user is beint told something what I find usefull. But in the &#060;script runat=server&#062; tag there can&#039;t be switched to HTML mode (%&#062; &#060;%) and so the &#060;!-- include file --&#062; can&#039;t be used. <BR><BR>It would be possible with Server.Execute (works for HTML) but... In the HTML is displayed something from a shared var and that isn&#039;t available in the code when executed with server.execute :-(<BR><BR>Is there something I have missed? Some nice function as a server.include? ;-)<BR><BR>Short:<BR>How can I include another aspx file from a function in the &#060;script runat=server&#062; tag that is 99% HTML, but uses a shared var from the parent aspx?<BR><BR>Thomas Brinkman

  2. #2
    Join Date
    Dec 1969

    Default RE: Including files ?!?

    Sounds like you need a "User Control". Read up on them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts