Redirection To Page Issue.
-
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.
-
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.
-
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.
You can use URL Rewriting Follow this link URL Rewriting with ASP.NET[^]
Best Regards, Chetan Patel
-
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.
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.
-
You can use URL Rewriting Follow this link URL Rewriting with ASP.NET[^]
Best Regards, Chetan Patel
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.
-
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.
Use Server.Transfer
Best Regards, Chetan Patel