Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. !include aspx in anotheraspx

!include aspx in anotheraspx

Scheduled Pinned Locked Moved ASP.NET
question
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mamatha_raghu
    wrote on last edited by
    #1

    hello like i have one aspx/asp page which iam using in my many anither pages so i don't want to write all the stuff every time how can i do this? i tried with its not working and i also tried with response.writefile("file.aspx") its working but i want to use some functions of file.aspx page in my present page

    _ 1 Reply Last reply
    0
    • M mamatha_raghu

      hello like i have one aspx/asp page which iam using in my many anither pages so i don't want to write all the stuff every time how can i do this? i tried with its not working and i also tried with response.writefile("file.aspx") its working but i want to use some functions of file.aspx page in my present page

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      You have to create user controls for that purpose. They are just like your aspx pages and you can drag and drop to any page you want. The extension for that is ascx.

      Best Regards, Apurva Kaushal

      M 1 Reply Last reply
      0
      • _ _AK_

        You have to create user controls for that purpose. They are just like your aspx pages and you can drag and drop to any page you want. The extension for that is ascx.

        Best Regards, Apurva Kaushal

        M Offline
        M Offline
        mamatha_raghu
        wrote on last edited by
        #3

        but i have "response.write" stmts in my page how can it work any other way? can any one send me one example?

        _ 1 Reply Last reply
        0
        • M mamatha_raghu

          but i have "response.write" stmts in my page how can it work any other way? can any one send me one example?

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          It does not matter. What you need to do is first create a ascx page(User control). Same as you create a aspx page and then drag it from solution explorer to you web page(aspx page) and that over. You can get the contents of the control to the page. :)

          Best Regards, Apurva Kaushal

          M 1 Reply Last reply
          0
          • _ _AK_

            It does not matter. What you need to do is first create a ascx page(User control). Same as you create a aspx page and then drag it from solution explorer to you web page(aspx page) and that over. You can get the contents of the control to the page. :)

            Best Regards, Apurva Kaushal

            M Offline
            M Offline
            mamatha_raghu
            wrote on last edited by
            #5

            thanks alot for a very fsater reply but still iam getting prob because i have some functions in my first page which are having response.write stmts ok and i want to use these functions in my second page.........iam getting reference error thanks in advance

            _ 1 Reply Last reply
            0
            • M mamatha_raghu

              thanks alot for a very fsater reply but still iam getting prob because i have some functions in my first page which are having response.write stmts ok and i want to use these functions in my second page.........iam getting reference error thanks in advance

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #6

              I am not been able to understand your because i dont think there is any relation between your user control and response.write statements. What is the exact error message and you debug the code and see where which part is diaplaying the error.

              Best Regards, Apurva Kaushal

              M 1 Reply Last reply
              0
              • _ _AK_

                I am not been able to understand your because i dont think there is any relation between your user control and response.write statements. What is the exact error message and you debug the code and see where which part is diaplaying the error.

                Best Regards, Apurva Kaushal

                M Offline
                M Offline
                mamatha_raghu
                wrote on last edited by
                #7

                hai apurva let me explain what i need exactly ihave one.aspx page ok in that i have written some functions to display some table of content ok for example... in my one.aspx ihave a function like... function disp(pagesize,query...etc) (iused record set of adodb here to fech the table from param query passed ok) response.write("") (taken loop to display) response.write(") and so on. now i want to use this function in my second.aspx i think now it is clear thanks

                recods that feched from table

                _ 1 Reply Last reply
                0
                • M mamatha_raghu

                  hai apurva let me explain what i need exactly ihave one.aspx page ok in that i have written some functions to display some table of content ok for example... in my one.aspx ihave a function like... function disp(pagesize,query...etc) (iused record set of adodb here to fech the table from param query passed ok) response.write("") (taken loop to display) response.write(") and so on. now i want to use this function in my second.aspx i think now it is clear thanks

                  recods that feched from table

                  _ Offline
                  _ Offline
                  _AK_
                  wrote on last edited by
                  #8

                  If you just want to use that function in multiple pages then what you can so is place that function in a class file and then call it from the pages where ever you want.

                  Best Regards, Apurva Kaushal

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups