Cancel Button Redirects Back To Originating Page
Sep 7, 2010
I'm building an ASP.NET 3.5 webapplication using VB.NET, and I'm having problems redirecting to another URL when using Google Chrome. Other browsers like IE and Firefox are fine.
My data entry forms all have an OK and an Cancel button, which are both handled server-side. The Cancel button just redirects back to the originating page, while the OK button will add or update a database record and then redirect to the originating page.
The redirect to the originating page is done by calling the following shared sub on a general utilities class in my appication:
[Code]....
As you can see, I've tried using the extra argument in the response.Redirect call, but that doesn't make a difference. All browsers except Google Chrome redirect fine, but Chrome does not redirect at all. When pushing the Cancel button nothing seems to happen. And when pushing the OK button, the corresponding database record is added or updated, but the redirect to the originating page doesn't happen. This Chrome redirect problem occurs only on the production server. When running the application at 'localhost' there is no problem. what might be causing this redirect issue in Google Chrome?
View 9 Replies
Similar Messages:
Feb 21, 2011
I would periodically get a message stating "too many redirects". I used debug this moring and found out that my login page, even with no code in the page_load and no script does 9 redirects back to itself. I use forms authentication and assume it has something to do with that.
View 3 Replies
Sep 3, 2010
I'm trying to save some content whenever a button/hyperlink is clicked using jquery.ajax (Using Asp.net 3.5). The logic is as follows:
Through .bind in jquery I bind my own method(MakeLog) to a button click or hyperlink click. The click events of button/hyperlink contain nothing, I need to use .bind for selective controls.Now we have a button whose click event will fire a method, say MakeLog.Code snippet for MakeLog is as follows:
var xhr = jQuery.ajax({
url: "/Logger.aspx",
data: { content: logContent }, [code]....
This works fine in IE but in Firefox this is not sending the data back as expected.I tried to identify the issue and came across the following: http://stackoverflow.com/questions/3522944/jquery-ajax-calls-async-false-vs-async-true .What I understand is that, whenver page is redirecting/reloading due to button click or hyperlink click the async call is not working properly.
View 1 Replies
Oct 28, 2010
I am using a LINQ to SQL data source for a ListView and perform a validation check in the Listview ItemUpdating event:
[Code]....
This works great and keeps the user from updating the record with invalid data.However, when I hit cancel after this operation, it saves the text in the box rather than cancelling the operation. Here's my code for the update button:
[Code]....
Update Function:
[Code]....
I do not handle the cancel button event, as the cancel operation has worked fine... unless someone enters incorrect information and e.Cancel is set to true.What am I doing wrong? Is it the mixture of using the LINQ Datasource and doing my own updating?
View 1 Replies
Jul 7, 2012
i m having problem with logout code in asp.net with c#. this logout code should end session, disable browser's back button and and if somebody try to login by paste the url of any user account page.i used this code in login page
protected void Button1_Click(object sender, EventArgs e)
{
Session["name"] = TxtUserName.Text;
}
and in logout i used this
protected void logout_Click(object sender, EventArgs e)
{
Session.RemoveAll();
Session.Abandon();
Response.ClearHeaders();
Response.Redirect("login.aspx");
}
nothing happening back button is still visible
View 1 Replies
Jan 24, 2011
I am trying to see if it possible to create a back button that goes back 3 pages and refreshes that page. The make up of my page is a little complex. The Home page has a password prompt that enables a multiview to be visible with a gridview of information. The gridview has a details link that has a 2 querystrings that gets sent to the details page. The details page has the ability to be edited and updated. this is why I wanted it to go back 3 pages. The code I am using to go back is
<asp:Button ID="Button2" runat="server" CausesValidation="False" OnClientClick="javascript:history.go(-3);return false;" Text="Back" UseSubmitBehavior="False" />
View 4 Replies
Aug 25, 2010
I am using an image button and on click of it i want to go to visited page.
Now i am using - Response.Redirect(Request.UrlReferrer.ToString()),
It is going to previous page, but when i am in a page of some user details where the link is looks like - users.aspx?userid=25 and i visit some other page and click back(image button) i want to see the same serdetail page. How to track that.
View 2 Replies
Oct 9, 2010
i am doing simple login page and i used to required field validator to validate use
now i want to redirect this page to home.aspx after clicking on cancel button, but that two required fields validator get pop up and i get stuck in login page.
View 1 Replies
Feb 5, 2010
I am using ASP.net with C#.After I logout its possible to go back to pages using back button.I could fix the prob for the login.I have prob with the logout.I am using the inbuilt login page provided by the asp editor.Should I use sessions?
View 6 Replies
Jan 11, 2011
I'm working on a manager of sorts that allows certain employees to view the results of a survey customers take. I'm tracking the IP address of the customers that take the survey and displaying that ip address to the employees who can view the results. I'm using a gridview with an sqldatasource to extract the data out of the database and display it. What I would like to do is add a button or link that takes the IP address and appends it to a url of web site to track the location of the ip address on a map. I have already signed up for a serivce to do this but am unsure of how to code it.
Here is my Gridview
<asp:GridView ID="GVnewsletterManager" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" [code]...
View 1 Replies
Jun 20, 2010
I have a LoginView element in an Update panel and use JQuery to hide the div containing the update panel when the cancel button(Html) is clicked.
It works fine normally. However, when I enter an invalid password and there is an error message displayed, the Javascript attached to the Cancel button click stops firing.
[code]....
View 2 Replies
Feb 17, 2011
I have a button in teh content page and teh master page has soem jquery scripts ,the button in the content page does not post back .
View 4 Replies
Sep 25, 2012
am creating a web application in using c# with asp.net.
in that am using login page only as normal aspx page. other pages are using masterpage.
when i click logout button in masterpage. page will redirect to login page. after that if i click browser back button it was moving to previous page. how can i prevent this.
am using this following code in master page aspx page. And My log out button code is below.
<%if (!Page.User.Identity.IsAuthenticated)
{ %>
<script type = "text/javascript" >
function preventBack() { window.history.forward(); }
setTimeout("preventBack()", 0);
window.onunload = function() { null };
</script>
<%} %>
But exactly what i need is once if login page loaded or logged out then it wont go to previous page.
View 1 Replies
Dec 24, 2010
I have a page in which I am not using cache by using this code:
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
Now I want to know: Is there any difference between coming to this page using a proper link or coming back using browser back button, or is there any way to detect this?
View 2 Replies
Jul 23, 2010
if users press the browser's back button to reach the prior page..then page should display a message like "web page expired" in asp.net can i use javascript for this?
for example..
there are 4 pages in web sites. 1,2 and 3 can be back. but when the 4th page run then 4th page can not be back... when the user press browser's back button , diaplay ma message "weg page expired".
View 4 Replies
Feb 23, 2011
I have a AsyncFileUpload control on a greybox popup. There are some processing that happens, and then closes the popup registering javascript as a button click event fires.
If i upload a file with the AsyncFileUpload popup page redirects to itself instead of the parent page. It redirects to the parent page as it supposed to if I dont upload a file using AsyncFileUpload. Another thing I have noticed is if I upload a file using AsyncFileUpload popup gets closed and redirects to self on any button click even without the close script call.
View 1 Replies
Nov 12, 2010
From pageA, clicking a button to open pageB which display a crystal report. User can only use browser back button. How to open pageC from pageB? Can I add code in pageB close (if there is a page close event) or make back button in browser to open pageC instead of pageA?
View 2 Replies
Jul 6, 2010
I have a search field (text box) at the top of my page. When you type something, and press enter, the page navigates back to the previous page? What I want it to do is act as if I clicked the Search button.
View 5 Replies
Apr 20, 2010
I have 2 animation Extender that go in order, animationextender1 then animationextender2, I have a NEXT and BACK button on the second one, the thing is when I click BACK it works, but then if I click NEXT again, nothing happens, do I have to run some code in the back when I click BACK to get the NEXT to work again? I am running this under an updatepanel
View 1 Replies
Jul 29, 2010
If you do a search for "ie8 back button disabled" you'll see a number of blogs with people having difficulties with the Internet Explorer version 8 back button becoming disabled. This now happened to one of my ASP .Net pages. The page uses a user control, aspx page, and a master page. It uses no redirects and seems to be happening when I click the back button and then the forward button (after the forward button is clicked, it does not fire the Load event and the back button becomes disabled). Has anyone else encountered this and do you have a solution for it?
View 2 Replies
Jul 6, 2010
If I'm on a searchable site (example.com for example) and search some data then get a dropdown list, when I click on one of the items, then try to use the browser's back button to go back, I get the error "the page cannot be displayed". Does this have something to do with cookies or history settings?
I don't have this problem with mozilla, but I prefer to use IE for other reasons.
View 7 Replies
Jul 14, 2010
in my ajaxified page i have used several user control shifting from one user control to anothe r and then pressing the back button takes me to first page instead of previously filtered page how to solve this all this filters are linkbuttons i am also using listview these filters are actually filtering the content of this listview
View 1 Replies
Dec 30, 2010
I have read that you can not disable the back button on page load but I can clear the cashe on page load so the back button would then be greyed out. I have read a few articles on this and I am unable to get it working. I am using MS visual web developer 2010.
View 2 Replies
Jan 26, 2010
I inserted a record in my database and if it is successful, then, it will automatically redirected on a certain page. However, when I click on the BACK button of the browser, it will bring back of course the previous page and at the same time, the data that I encoded still appear. How am be able my page that if in case my users click on the Back button of the browser it will redirect on a certain page or if not, the entries will not appear.
View 5 Replies
Jun 8, 2010
i designed a shopping cart application and i implemet some script to prevent back button. If i hit back button i am getting the error as webpage expired. If i refresh again the same page is getting displayed. What i need is i would like to be the user in the same page if he hit the back button. In some cases if i hit back button the previous page is getting displayed and again redirectiing to the current page.
View 12 Replies