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 782219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:21:10+00:00 2026-05-14T20:21:10+00:00

i am using simple asp.net webpage with few fields on it and when the

  • 0

i am using simple asp.net webpage with few fields on it and when the user click on submit button i am calling asynchronously and posting the data.

BUT, my whole page is posting back and i dont even see the message that i am trying to display if my data got posted succfully.

here is my page.

     <div id="status"></div>   
    <asp:Label runat="server" ID='lbl'  >Name:</asp:Label>
                 <asp:TextBox ID="txtName" runat='server'></asp:TextBox>               

    <asp:Label runat="server" ID='Label4'  >Host Name:</asp:Label>
                <asp:TextBox ID="txtHost" runat='server'></asp:TextBox>

    <asp:Label runat="server" ID='Label2'  >Start Date:</asp:Label>
                 <asp:TextBox ID="txtStartDate" runat='server'  ></asp:TextBox>

    <asp:Label runat="server" ID='Label6'  >End Date:</asp:Label>
                <asp:TextBox ID="txtEndDate" runat='server'  ></asp:TextBox>        


          <ul>
          <li>
            <button id="btnCancel" name="btnCancel" type="button">
              Cancel</button></li>
          <li>
            <button id="btnReset" name="btnReset" type="reset">
              Reset</button></li>
          <li>
            <button id="btnSubmit" name="btnSubmit" type="submit">
              Submit</button></li>
        </ul>
    </p> 
    </form>
</div>

//Store new Contract Request Methods
    function processCompletedContactStore(response) {

       if (!response) {
           showErrorMsg('No Contacts Returned');
           return;
       }
       else { 
           if (response.Message == 'update') {
               $("#status").fadeTo(500, 1, function() { $(this).html("Updated successfully!").fadeTo(500, 150); })
           }
       } 
    }


function SavePage() {

    var request = buildNewContactRequest();

    ContactServiceProxy.invoke({ serviceMethod: "PostNewContact",
        data: { request: request },
        callback: function(response) {     
            processCompletedContactStore(response);
        },
        error: function(xhr, errorMsg, thrown) {
            postErrorAndUnBlockUI(xhr, errorMsg, thrown);
        }
    }); 
    return false; 
} 

$(document).ready(function() 
{
    $("#btnSubmit").click(function() {     
            SavePage();
        });
});
  • 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-14T20:21:11+00:00Added an answer on May 14, 2026 at 8:21 pm

    are you binding the function call to the submit button? if so you need to return false at the end of the function, this stops the standard form post.

     $("#btnSubmit").click(function() {     
               return SavePage();
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a simple ASP.Net application on a Windows 7 x64 machine using
What I have created a very simple asp.net web service using .NET framework 3.5,
I'm planning to design simple website using ASP.NET MVC new technology. Many concepts are
This is a simple website in ASP.NET with C# using VS 2010. I have
Im using regular asp.net c# (webforms) i need to build a simple form that
I'm using IIS7 and ASP.NET. Basically building a simple CMS and need to handle
I am trying to create a simple blog application using asp.net. I am a
I tried using webparts on an asp.net webpage and got a blank screen. While
to all. i developing a webpage using asp.net with c# language, in this webpage
I have to create a simple webpage on asp.net 4 with vertical slidedown slideup

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.