Interviews10 answers
what is the difference between response.redirect() and navigateurl?
10 Answers
NavigateUrl is the property of Hyperlink where URL is defined and navigates to a given link.Where as response.redirect (pageurl) navigates to defined page url.
Sunil BabuPosted Apr 3, 2016, 3:59 AM EDT
Response.Redirect method
This method is used to navigate to another page from code. You can use this method to navigate from a Linkbutton or ImageButton control.
NavigateUrl property
Use the NavigateUrl property to specify the URL to navigate to when the HyperLink control is clicked.
Srinivas PabballaPosted Aug 27, 2015, 11:59 PM EDT
By using Response.Redirect(), we can pass the value from one page to another page. But by navigateurl we only jump to another page
Rahul PrajapatPosted May 25, 2015, 10:33 PM EDT
This is server control use for navigation to another page specified in the NavigateURL property. Hyperlink control doesn't expose any server side event.
Response.Redirect method
This method is used to navigate to another page from code. You can use this method to navigate from a Linkbutton or ImageButton control.
Pankaj Kumar ChoudharyPosted May 25, 2015, 10:32 PM EDT
refer my article
http://www.c-sharpcorner.com/UploadFile/0c1bb2/response-redirect-true-and-response-redirect-false-in-asp-ne/
Vithal WadjePosted Dec 31, 2014, 8:21 AM EST
Using Response.Redirect(), We can pass a value from one page to another page.
But using navigateurl we can only jump to another page but we can't pass any value.
Niranjan MaharanaPosted Jul 5, 2014, 2:13 AM EDT
Hyperlink control
This is server control use for navigation to another page specified in the NavigateURL property. Hyperlink control doesn't expose any server side event.
Response.Redirect method
This method is used to navigate to another page from code. You can use this method to navigate from a Linkbutton or ImageButton control.
For example
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Redirect("Page2.aspx")
End Sub
Bhabani PrasadPosted May 21, 2014, 6:52 AM EDT
Hyperlink control
This is server control use for navigation to another page specified in the NavigateURL property. Hyperlink control doesn't expose any server side event.
Response.Redirect method
This method is used to navigate to another page from code. You can use this method to navigate from a Linkbutton or ImageButton control.
For example
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Redirect("Page2.aspx")
End Sub
Bhabani PrasadPosted May 21, 2014, 6:52 AM EDT
http://forums.asp.net/t/995478.aspx?Response+Redirect+vs+NavigateUrl
Shweta LodhaPosted Apr 23, 2014, 9:13 AM EDT
In a button click event....
Response.Redirect("../default.aspx");
This is on a user control inside the include folder.
Works ok for any page that is also in a folder.
But, go to the root, it wants to go outside the Virtual Directory into the wwwroot folder to another default page. This is on my dev pc.
Now, if I upload it to the server, it works ok again.
I can use a simple hyperlink and it never goes outside the virtual directory.
I can use a Request.Url and do some string manipulation but that seems not good enough.
I ran into this a few years ago and simply used 2 navigation user controls - one for folder pages and one for root pages. But this new site I need to use just one.
Munesh SharmaPosted Apr 15, 2014, 2:43 AM EDT






