Help For ASP Page.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pushkar
    New Member
    • Jul 2006
    • 10

    Help For ASP Page.

    Hi friends.

    I have asp pages in which i have included 2 files Header.asp & Right-Hand.asp.

    The problem is that the <TD> in both files(Header.as p & Right-Hand.asp) should be increase as the content of the current page increase.Beside s header.asp also contain header and left side portion in which i want show advertise i mean in both left side & right side.

    I can't do b'caz i have just include these files in every page.So i can't get idea how to increase the size of included files <TD> according the content of the current page.

    Can anybody have solution????
  • divide
    New Member
    • Sep 2006
    • 4

    #2
    I'm not entirely sure if I'm interpreting what you're asking correctly. if you mean that these included files write out some html, but you want to be able to alter attributes of <td> elements in the included files, then you could try this:

    Rather than have the files directly output their HTML content wherever you place them by means of your <include> statements, have the HTML in the included files placed within sub's. Have the values you want to use within the <td>'s passed into the sub's as parameters, and call the subs on the main page in the places where you need the HTML to be rendered.

    Hope this helps!

    Comment

    • pushkar
      New Member
      • Jul 2006
      • 10

      #3
      Originally posted by divide
      I'm not entirely sure if I'm interpreting what you're asking correctly. if you mean that these included files write out some html, but you want to be able to alter attributes of <td> elements in the included files, then you could try this:

      Rather than have the files directly output their HTML content wherever you place them by means of your <include> statements, have the HTML in the included files placed within sub's. Have the values you want to use within the <td>'s passed into the sub's as parameters, and call the subs on the main page in the places where you need the HTML to be rendered.

      Hope this helps!

      You are getting my problem in right way but the solu u hav given i cant understand.Can u give Example Code.
      Last edited by pushkar; Sep 12 '06, 12:30 PM. Reason: Some addition

      Comment

      • divide
        New Member
        • Sep 2006
        • 4

        #4
        ok, example:

        in your right-hand.asp do something like this:

        Code:
        sub doRighthand(tdNum)
          %>
          <table>
            <tr>
              <td style="width:<% =tdNum %>"></td>
            </tr>
          </table>
          <%
        end sub
        then in your main page include the right-hand file at the top of the page, and call the sub wherever on the page you need it, passing in the appropriate parameter for the td:

        Code:
        <!--#Include file="right-hand.asp"-->
        <html>
        <head>
        etc...
        etc...
        <%
        doRighthand 50
        %>
        etc...
        Hope this explains it better

        Comment

        Working...