Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


why wont to go the page 2

Posted on 2009-04-29
Medium Priority
Last Modified: 2012-05-06
What is wrong with this code? It wont transfer to page 2.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="WebApplication1.login" %>
<!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>Untitled Page</title>
    <form id="form1" runat="server">
            Log In</h1>
            <asp:Label ID="username" runat="server" Text="User Name:"></asp:Label>
            <asp:TextBox ID="user_name_box" runat="server" MaxLength="15"></asp:TextBox>
            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                runat="server" ControlToValidate="user_name_box" 
                ErrorMessage="Please enter a valid user name" 
            &nbsp;<br />
            <asp:Label ID="password" runat="server" Text="Password: "></asp:Label>
            <asp:TextBox ID="password_box" runat="server"></asp:TextBox>
            <br />
            <asp:Button ID="Button1" runat="server" Text="Login" 
                onclientclick="shop.aspx" />
            Click here if your a new user</p>

Open in new window

Question by:texans

Accepted Solution

tillgeffken earned 1000 total points
ID: 24259274

That should describe of what kind your problem with the onclientclick event is. However you might want to look into .Net integrated security solutions such as http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx before going down that road.
LVL 22

Assisted Solution

neeraj523 earned 1000 total points
ID: 24259687

It seems you are doing something wrong. Button1 is a server control and you should write your login script in onclick event of this control in code behind file. in .net, you are not require to submit your form to other page to process input..

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question