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. Passing data to another page without receive frm database

Passing data to another page without receive frm database

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestion
8 Posts 3 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
    MichaeltCheong
    wrote on last edited by
    #1

    Can anyone tell me how to pass a data to another, Eg the textbox1 in page1.aspx data(such as hello) when i click on button save, the save button will redirect to page2.aspx and at the textbox2 at page2.aspx will show the data(such as hello) i'm key in previous page page1.aspx. can anyone help me plszzzzzz, did u all understand what i mean T_T , what function/technology i nid to use?

    J 1 Reply Last reply
    0
    • M MichaeltCheong

      Can anyone tell me how to pass a data to another, Eg the textbox1 in page1.aspx data(such as hello) when i click on button save, the save button will redirect to page2.aspx and at the textbox2 at page2.aspx will show the data(such as hello) i'm key in previous page page1.aspx. can anyone help me plszzzzzz, did u all understand what i mean T_T , what function/technology i nid to use?

      J Offline
      J Offline
      JammoD87
      wrote on last edited by
      #2

      Hi, Take a look at Cross Page Posting, i've provided a link below :) MSDN: Cross Page Posting[^] Thanks,

      Personal Blog: A Software Programmer Twitter: JammoD

      M 2 Replies Last reply
      0
      • J JammoD87

        Hi, Take a look at Cross Page Posting, i've provided a link below :) MSDN: Cross Page Posting[^] Thanks,

        Personal Blog: A Software Programmer Twitter: JammoD

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

        :) thank you , that is what i found ^_^ i dun't know what is this function ~

        1 Reply Last reply
        0
        • J JammoD87

          Hi, Take a look at Cross Page Posting, i've provided a link below :) MSDN: Cross Page Posting[^] Thanks,

          Personal Blog: A Software Programmer Twitter: JammoD

          M Offline
          M Offline
          MichaeltCheong
          wrote on last edited by
          #4

          JammoD87 after cross page at second page, i press the back button the data at first page nid to remain, how to do this ?

          J 1 Reply Last reply
          0
          • M MichaeltCheong

            JammoD87 after cross page at second page, i press the back button the data at first page nid to remain, how to do this ?

            J Offline
            J Offline
            JammoD87
            wrote on last edited by
            #5

            In which case you will need to use either "Session" or "Cookies" to store the value from the text box and check the value on page load. Thanks

            Personal Blog: A Software Programmer Twitter: JammoD

            M 2 Replies Last reply
            0
            • J JammoD87

              In which case you will need to use either "Session" or "Cookies" to store the value from the text box and check the value on page load. Thanks

              Personal Blog: A Software Programmer Twitter: JammoD

              M Offline
              M Offline
              MichaeltCheong
              wrote on last edited by
              #6

              my client side on 1 page involve alot ajax function such as tab container and <70 filter textbox container i dun't know where the error occur, the code below i try on new page can work. The cross page postback can use with ajax exception and master page? Can teach me another method to get the ID on previous page ? can i use query string ? Thank page1.aspx

              <asp:Button ID="Save" runat="server" class="styled-button-10"
              PostBackUrl="~/test2.aspx" Text="Save" />

              page2.aspx

              <script runat="server">

               void Page\_Load(object sender, System.EventArgs e)
               {
                   Label1.Text = ((TextBox)PreviousPage.FindControl("txtID")).Text;
                  Response.Write("" + Label1.Text );
              }
              

              </script>

              1 Reply Last reply
              0
              • J JammoD87

                In which case you will need to use either "Session" or "Cookies" to store the value from the text box and check the value on page load. Thanks

                Personal Blog: A Software Programmer Twitter: JammoD

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

                JammoD thank ^^ can ady~ thx to teach me cross page :thumbsup:

                page1.aspx
                <asp:Button ID="Save" runat="server" class="styled-button-10"
                PostBackUrl="~/test2.aspx" Text="Save" />

                page2.aspx
                <script runat="server">

                 void Page\_Load(object sender, System.EventArgs e)
                 {
                     Label1.Text = ((TextBox)PreviousPage.FindControl("txtID")).Text;
                    Response.Write("" + Label1.Text );
                }
                

                </script>

                R 1 Reply Last reply
                0
                • M MichaeltCheong

                  JammoD thank ^^ can ady~ thx to teach me cross page :thumbsup:

                  page1.aspx
                  <asp:Button ID="Save" runat="server" class="styled-button-10"
                  PostBackUrl="~/test2.aspx" Text="Save" />

                  page2.aspx
                  <script runat="server">

                   void Page\_Load(object sender, System.EventArgs e)
                   {
                       Label1.Text = ((TextBox)PreviousPage.FindControl("txtID")).Text;
                      Response.Write("" + Label1.Text );
                  }
                  

                  </script>

                  R Offline
                  R Offline
                  Rockstar_
                  wrote on last edited by
                  #8

                  yes, Nice...

                  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