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. Redirection To Page Issue.

Redirection To Page Issue.

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 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.
  • V Offline
    V Offline
    VikashGohil
    wrote on last edited by
    #1

    Hello, This Is Vikash Gohil. I need some guideline/help on the following issue. I have a webpage with a function written on Page_load event which takes the arguments from url using querystring and prints a single line on the page after execution of the function. Now as per my knowledge, if i need to execute that function, i need to provide the full url in the address bar of the browser along with arguments needed. Now what i want is, I dont want my webapp to redirect to that webpage but still need the function on that page, to get executed with the dynamically passed argument values. Now, in first place, is this thing possible? If yes, then can someone tell me the way to do it. if no, then can i achieve this functionality in some other way? All i want is the user must not be redirected, but still want to execute the function on another page. Awaiting a reply soon, any help would be highly appreciated. Thanks in Advance.

    D C 2 Replies Last reply
    0
    • V VikashGohil

      Hello, This Is Vikash Gohil. I need some guideline/help on the following issue. I have a webpage with a function written on Page_load event which takes the arguments from url using querystring and prints a single line on the page after execution of the function. Now as per my knowledge, if i need to execute that function, i need to provide the full url in the address bar of the browser along with arguments needed. Now what i want is, I dont want my webapp to redirect to that webpage but still need the function on that page, to get executed with the dynamically passed argument values. Now, in first place, is this thing possible? If yes, then can someone tell me the way to do it. if no, then can i achieve this functionality in some other way? All i want is the user must not be redirected, but still want to execute the function on another page. Awaiting a reply soon, any help would be highly appreciated. Thanks in Advance.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Whatever code you have written in the Page_Load event of the webpage should be removed and kept in a method in some other class. You can have something like Common.cs where you can put all the methods which are to be used across the webpages.

      V 1 Reply Last reply
      0
      • V VikashGohil

        Hello, This Is Vikash Gohil. I need some guideline/help on the following issue. I have a webpage with a function written on Page_load event which takes the arguments from url using querystring and prints a single line on the page after execution of the function. Now as per my knowledge, if i need to execute that function, i need to provide the full url in the address bar of the browser along with arguments needed. Now what i want is, I dont want my webapp to redirect to that webpage but still need the function on that page, to get executed with the dynamically passed argument values. Now, in first place, is this thing possible? If yes, then can someone tell me the way to do it. if no, then can i achieve this functionality in some other way? All i want is the user must not be redirected, but still want to execute the function on another page. Awaiting a reply soon, any help would be highly appreciated. Thanks in Advance.

        C Offline
        C Offline
        Chetan Patel
        wrote on last edited by
        #3

        You can use URL Rewriting Follow this link URL Rewriting with ASP.NET[^]

        Best Regards, Chetan Patel

        V 1 Reply Last reply
        0
        • D dan sh

          Whatever code you have written in the Page_Load event of the webpage should be removed and kept in a method in some other class. You can have something like Common.cs where you can put all the methods which are to be used across the webpages.

          V Offline
          V Offline
          VikashGohil
          wrote on last edited by
          #4

          Hello, danish. Thanks for your response. But the problem is I cannot change any code as it is not my creation, it is like a 3rd party Control so i can only use it and not change anything. But anyway thanks for the reply.

          1 Reply Last reply
          0
          • C Chetan Patel

            You can use URL Rewriting Follow this link URL Rewriting with ASP.NET[^]

            Best Regards, Chetan Patel

            V Offline
            V Offline
            VikashGohil
            wrote on last edited by
            #5

            Hello, Chetan. Thanks for your reply. But what I want is not hiding the actual URL from the user. My actual requirement is to execute code written in page_load event on another page without redirecting to that page. Is this thing possible? Please reply.

            C 1 Reply Last reply
            0
            • V VikashGohil

              Hello, Chetan. Thanks for your reply. But what I want is not hiding the actual URL from the user. My actual requirement is to execute code written in page_load event on another page without redirecting to that page. Is this thing possible? Please reply.

              C Offline
              C Offline
              Chetan Patel
              wrote on last edited by
              #6

              Use Server.Transfer

              Best Regards, Chetan Patel

              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