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

  • Home
  • SEARCH
  • 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 8459529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:21:21+00:00 2026-06-10T13:21:21+00:00

HTML Page <body> <form id=form1 action=Default.aspx method=post> <input runat=server id=txtuser type=text /> <input runat=server

  • 0

HTML Page

<body>
  <form id="form1" action="Default.aspx" method="post">
    <input runat="server" id="txtuser" type="text" />
    <input runat="server" id="txtpwd" type="password" />
    <input type="submit" value="Login"/>
 </form>
</body>

Code-behind

protected void Page_Load(object sender, EventArgs e)
{
   if (!Page.IsPostBack)
   {
        Login();
   }
}

private void Login()
{
   if (checkUser(Request.Params["txtuser"],Request.Params["txtpwd"]))
   {
        Response.Redirect("Success.aspx");//if success
   }
}

I am developing a web page for old mobile version (like nokia N70) facing a problem. When I submit my username and password then check user return true to redirect to a new page. But it won’t redirect to success.aspx. So I debug point on the Response.Redirect code, it can stop there and I continue run become error because getting the username&password null. Then I realized it loaded the page twice. How to solve it?

  • 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-06-10T13:21:23+00:00Added an answer on June 10, 2026 at 1:21 pm

    You want to login when there IS a PostBack. Not the other way around.

    Change

    if (!Page.IsPostBack)
    

    to

    if (Page.IsPostBack)
    

    Make sure you have set AutoEventWireup to true in Code Front:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"...
    

    otherwise Page_Load is never fired.

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

Sidebar

Related Questions

//Html - page containing link to open dialog <input type=text value=something id=inputbox_id /> <a
I have this HTML form page: form1.html <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd
I've a simple html page with no code in the body tag. I want
I open a html page with a myApp.js included like this: <html> <body> ......
I have the following elements in a HTML page: <body> <div style=height:100%; width:100%> <div
On this page: http://www.anasiamusic.com/bio.html in the body text (Ana Sia's DJ crate is a
I have a page thusly: <html> <head></head> <body> <iframe src=local.html></iframe> <iframe src=http://www.google.com></iframe> </body> </html>
The main structure of the page is like this: <html> <body> <div id=Menu> <h1>Menu</h1>
I'm trying to set the default focus on an input box when the page
To post data to a remote payment server, my website generates a page that

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.