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. Re: Difference between windows and web applications

Re: Difference between windows and web applications

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
9 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.
  • M Offline
    M Offline
    m_aung2
    wrote on last edited by
    #1

    Dear All, I am new to ASP.Net. In windows application, a particular form can be called by a previous form. (eg. form2 is called from form1 - the entry point to form2 is from form1 only.) In web application, my understanding is that form2 can be called from brower address bar by typing the address of form2. How it can be done as in windows application. Please forgive me, if it is a wrong site for the question. Thanks, Aung.

    P N M 3 Replies Last reply
    0
    • M m_aung2

      Dear All, I am new to ASP.Net. In windows application, a particular form can be called by a previous form. (eg. form2 is called from form1 - the entry point to form2 is from form1 only.) In web application, my understanding is that form2 can be called from brower address bar by typing the address of form2. How it can be done as in windows application. Please forgive me, if it is a wrong site for the question. Thanks, Aung.

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      From one page to another, you want to use Response.Redirect, or Server.Transfer. There isn't the same concept of individual pages really being aware of each other, as in a windows application though.

      1 Reply Last reply
      0
      • M m_aung2

        Dear All, I am new to ASP.Net. In windows application, a particular form can be called by a previous form. (eg. form2 is called from form1 - the entry point to form2 is from form1 only.) In web application, my understanding is that form2 can be called from brower address bar by typing the address of form2. How it can be done as in windows application. Please forgive me, if it is a wrong site for the question. Thanks, Aung.

        N Offline
        N Offline
        Nouman Bhatti
        wrote on last edited by
        #3

        You must use Response.Redirect("Name of second page") or Server.Transfer("Name of second page") both will do the same thing i-e from form1 moves u to form2 to read more about this Google it.

        1 Reply Last reply
        0
        • M m_aung2

          Dear All, I am new to ASP.Net. In windows application, a particular form can be called by a previous form. (eg. form2 is called from form1 - the entry point to form2 is from form1 only.) In web application, my understanding is that form2 can be called from brower address bar by typing the address of form2. How it can be done as in windows application. Please forgive me, if it is a wrong site for the question. Thanks, Aung.

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

          Thanks for the answers. I would like to know is that - if it is called directly from browser address bar, show an error message and redirect to previous page. - if it is to be done at page load event, it is a correct practice. Thanks Aung.

          P G 2 Replies Last reply
          0
          • M m_aung2

            Thanks for the answers. I would like to know is that - if it is called directly from browser address bar, show an error message and redirect to previous page. - if it is to be done at page load event, it is a correct practice. Thanks Aung.

            P Offline
            P Offline
            Paddy Boyd
            wrote on last edited by
            #5

            You'll have trouble being able to tell the difference about where your page has come from in this instance. Not entirely sure what you mean by the page load...

            1 Reply Last reply
            0
            • M m_aung2

              Thanks for the answers. I would like to know is that - if it is called directly from browser address bar, show an error message and redirect to previous page. - if it is to be done at page load event, it is a correct practice. Thanks Aung.

              G Offline
              G Offline
              Gennady Oster
              wrote on last edited by
              #6

              Hi ! First of, you need the information from request header HTTP_Refferer, directly or wrapped in the Request object. Here is the interesting discussion about it. http://bytes.com/forum/thread646457.html[^] Regards, Gennady

              M 1 Reply Last reply
              0
              • G Gennady Oster

                Hi ! First of, you need the information from request header HTTP_Refferer, directly or wrapped in the Request object. Here is the interesting discussion about it. http://bytes.com/forum/thread646457.html[^] Regards, Gennady

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

                Dear All & Gennady, Thanks, I have read the discussion and it helps me to understand on the way of web application. As a beginner, I just tried to understand more of ASP.Net. Thanks, Aung.

                G 1 Reply Last reply
                0
                • M m_aung2

                  Dear All & Gennady, Thanks, I have read the discussion and it helps me to understand on the way of web application. As a beginner, I just tried to understand more of ASP.Net. Thanks, Aung.

                  G Offline
                  G Offline
                  Gennady Oster
                  wrote on last edited by
                  #8

                  BTW, you may do it programmatically too. Say, in the Page_Load of the first page you may set the session variable session("FirstPage") = 1 and in the Page_Load of the second page you may check this variable: if (session("FirstPage")==1) { // You're on the right way } else { // Accessing directly to second page } This is in the case when you use Server.Transfer, that preserves session. Response.Redirect - doesn't. Regards, Gennady

                  My English is permanently under construction. Be patient !!

                  modified on Tuesday, November 18, 2008 2:53 AM

                  M 1 Reply Last reply
                  0
                  • G Gennady Oster

                    BTW, you may do it programmatically too. Say, in the Page_Load of the first page you may set the session variable session("FirstPage") = 1 and in the Page_Load of the second page you may check this variable: if (session("FirstPage")==1) { // You're on the right way } else { // Accessing directly to second page } This is in the case when you use Server.Transfer, that preserves session. Response.Redirect - doesn't. Regards, Gennady

                    My English is permanently under construction. Be patient !!

                    modified on Tuesday, November 18, 2008 2:53 AM

                    M Offline
                    M Offline
                    m_aung2
                    wrote on last edited by
                    #9

                    Thanks Gennady, Yes, I intend to apply this method in my project. Thanks, Aung.

                    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