Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7567507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:40:51+00:00 2026-05-30T14:40:51+00:00

<form id=form1 action=Detail.aspx runat=server> <input type=submit id=save name=Submit value=Save and Add/> <asp:Button ID=Exit runat=server

  • 0
<form id="form1" action="Detail.aspx" runat="server">
  <input type="submit" id="save" name="Submit" value="Save and Add"/>
  <asp:Button ID="Exit" runat="server" Text="Exit" onclick="Exit_Click" />
</form>

CodeBehind

 protected void Exit_Click(object sender, EventArgs e)
   {
    Response.Redirect("Show.aspx");
   }

When I click the Exit Button the response is not going to Show.aspx.It goes to Details.aspx.I am unable to understand why the control is not passing to Show.aspx;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:40:53+00:00Added an answer on May 30, 2026 at 2:40 pm

    I have added a new page to my site that matches what you are describing, and it seems to work exactly as you wish it to:

    In the code behind:

    using System;
    
    namespace MyProduct.Web.Pages
    {
        public partial class Details : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                if (IsPostBack)
                {
                    Response.Write("If this text is visible then it works...");
                }
            }
    
            protected void Exit_Click(object sender, EventArgs e)
            {
                Response.Redirect("Show.aspx");
            }
        }
    }
    

    In the markup:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Details.aspx.cs" Inherits="MyProduct.Web.Pages.Details" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" action="Details.aspx" runat="server">
          <input type="submit" id="save" name="Submit" value="Save and Add"/>
          <asp:Button ID="Exit" runat="server" Text="Exit" onclick="Exit_Click" />
        </form>
    </body>
    </html>
    

    If i click “Save and Add” button then i remain on the same page (Details.aspx) and i see the text “If this text is visible then it works…”

    If i click the “Exit” button then i am taken to a page called Show.aspx

    Be sure that you have AutoEventWireup=”true” in the top of your aspx page. This might be why you are not hitting the Exit_Click handler.

    I hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got two simple input text fields in a HTML form: <input type=text name=data[User][name]
I have a form action that needs to have its value set from a
it it possible to get the form action of a GET form on submit
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')
I have an action that returns ViewResult (it's a detail form, public ViewResult AddFoo(long
i have form action file in another directory but some file send to this
So a form is submitted on my site, with form action equal to itself.
Given some typical search form, I can't construct this form action when submitting a
how can I change a form's action with prototype ? I've seen plenty of
Maybe I am missing something, but in symfony examples, in form submission action there's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.