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. asp.net 2010 button

asp.net 2010 button

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasetutorialquestion
5 Posts 4 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.
  • C Offline
    C Offline
    classy_dog
    wrote on last edited by
    #1

    I am adding some additional code to a C# 2010 web form application that I would like suggestions on how to accomplish the following: 1. I just created an additonal web form page to an existing application so the user can enter more information. I basically want the user to hit the 'back' button so they can return to the original web page and correct the values for up to 4 specific fields. There are two additional fields that the user is not allowed to change. 2. To point the user to the previous page, I do the command, "Response.Redirect("~/Att.aspx"); This works, 3. I want to be able to load all the information the user has entered already when the user returns to this web page. When the user returns to this webpage, the data has already been stored in two tables in the database. 4. Thus I am looking for your suggestion on how to accomplish this goal. I am thinking of the following options: a. returning the user to the orginal web page in the state it was when they hit the 'next' button to go to the previous webpage. However I do not know how to proceed with this method. b. Obtain the values from the database, or c. use session variables. Thus can you tell me what you think the best method would be and examples of code of how you would accomplish this goal?

    R D T 3 Replies Last reply
    0
    • C classy_dog

      I am adding some additional code to a C# 2010 web form application that I would like suggestions on how to accomplish the following: 1. I just created an additonal web form page to an existing application so the user can enter more information. I basically want the user to hit the 'back' button so they can return to the original web page and correct the values for up to 4 specific fields. There are two additional fields that the user is not allowed to change. 2. To point the user to the previous page, I do the command, "Response.Redirect("~/Att.aspx"); This works, 3. I want to be able to load all the information the user has entered already when the user returns to this web page. When the user returns to this webpage, the data has already been stored in two tables in the database. 4. Thus I am looking for your suggestion on how to accomplish this goal. I am thinking of the following options: a. returning the user to the orginal web page in the state it was when they hit the 'next' button to go to the previous webpage. However I do not know how to proceed with this method. b. Obtain the values from the database, or c. use session variables. Thus can you tell me what you think the best method would be and examples of code of how you would accomplish this goal?

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      I would probably use session variables. The details are all here: ASP.NET Session State Overview[^]. In the OnClick button method on the first page I would store the values in session variables and read them on the next form as required. When you navigate back to the first form repopulate appropriate fields with the session values. I'll leave it you to work out the particulars but the article link above should get you going.

      "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

      C 1 Reply Last reply
      0
      • C classy_dog

        I am adding some additional code to a C# 2010 web form application that I would like suggestions on how to accomplish the following: 1. I just created an additonal web form page to an existing application so the user can enter more information. I basically want the user to hit the 'back' button so they can return to the original web page and correct the values for up to 4 specific fields. There are two additional fields that the user is not allowed to change. 2. To point the user to the previous page, I do the command, "Response.Redirect("~/Att.aspx"); This works, 3. I want to be able to load all the information the user has entered already when the user returns to this web page. When the user returns to this webpage, the data has already been stored in two tables in the database. 4. Thus I am looking for your suggestion on how to accomplish this goal. I am thinking of the following options: a. returning the user to the orginal web page in the state it was when they hit the 'next' button to go to the previous webpage. However I do not know how to proceed with this method. b. Obtain the values from the database, or c. use session variables. Thus can you tell me what you think the best method would be and examples of code of how you would accomplish this goal?

        D Offline
        D Offline
        David Mujica
        wrote on last edited by
        #3

        Hmm ... I was thinking of getting the data from the database. My reason for this is that since you are adding functionality to an existing application, then let's assume that "Page 1" is a complete, working entity. Now you add "Page 2" to the applicaiton and you build it in such a way that it stands on it's own and can store the additional fields. You just now provide a link which would bring them back to "Page 1" which should know nothing about "Page 2" nor the data that it stores. Nice. Clean. Now if the data between Page 1 & 2 are more intricately related, it may not be so easy to implement it this way. One thing you should protect against is that the user cannot navigate to Page 2 without completing Page 1. Just a though. :rose: Remember to vote. :cool:

        1 Reply Last reply
        0
        • R R Giskard Reventlov

          I would probably use session variables. The details are all here: ASP.NET Session State Overview[^]. In the OnClick button method on the first page I would store the values in session variables and read them on the next form as required. When you navigate back to the first form repopulate appropriate fields with the session values. I'll leave it you to work out the particulars but the article link above should get you going.

          "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

          C Offline
          C Offline
          classy_dog
          wrote on last edited by
          #4

          I am already passing data to the second page as session varirables. When I return to the first page, I would need to pass session variables from page two to page one. I would need to create new session variables for page 1, correct?

          1 Reply Last reply
          0
          • C classy_dog

            I am adding some additional code to a C# 2010 web form application that I would like suggestions on how to accomplish the following: 1. I just created an additonal web form page to an existing application so the user can enter more information. I basically want the user to hit the 'back' button so they can return to the original web page and correct the values for up to 4 specific fields. There are two additional fields that the user is not allowed to change. 2. To point the user to the previous page, I do the command, "Response.Redirect("~/Att.aspx"); This works, 3. I want to be able to load all the information the user has entered already when the user returns to this web page. When the user returns to this webpage, the data has already been stored in two tables in the database. 4. Thus I am looking for your suggestion on how to accomplish this goal. I am thinking of the following options: a. returning the user to the orginal web page in the state it was when they hit the 'next' button to go to the previous webpage. However I do not know how to proceed with this method. b. Obtain the values from the database, or c. use session variables. Thus can you tell me what you think the best method would be and examples of code of how you would accomplish this goal?

            T Offline
            T Offline
            trooper0814
            wrote on last edited by
            #5

            Under some circumstances, you might want to post one page to another page. For example, you might be creating a multi-page form that collects different information on each page. In that case, you can configure certain controls (those that implement the IButtonControl interface, such as the Button control) on the page to post to a different target page. This is referred to as cross-page posting. Cross-page posting provides some advantages over using the Transfer method to redirect to another page http://msdn.microsoft.com/en-us/library/ms178139.aspx[^]

            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