Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# scripting not working
Message
De
29/09/2009 00:03:12
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Divers
Thread ID:
01426452
Message ID:
01426582
Vues:
33
Hi ..

below what I had (the latest update).. but html button ("commit") still not fired when it clicked?
< % @ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NetAdmin._Default" Title="Login" Theme="LoginStyle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<!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>

<script language="C#" type="text/C#" runat="server">
// <!CDATA[

    void commit_click(object sender, EventArgs e)
    {
    string txtuserid = Page.Request.Form["login"].ToString();
    string txtuserpass = Page.Request.Form["password"].ToString();
    wMatrix.MyClass1 myclass1 = new wMatrix.MyClass1();
    bool checklogin = myclass1.CheckLogin(txtuserid, txtuserpass);
    if (checklogin)
    {
        this.Response.Redirect("Default2.aspx");
    }
}

// ]]>
</script>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
	<title>Login Page</title>
	
	<link rel="shortcut icon" href="/favicon.ico" />
	<link rel="stylesheet" type="text/css" href="/LoginStyle/login.css" />
</head>

<body>

	<form id="login-form" action="#" method="post">
		<fieldset>
		
			<legend>Log in</legend>
			
			<label for="login">Email</label>
			<input type="text" id="login" name="login"/>
			<div class="clear"></div>
			
			<label for="password">Password</label>
			<input type="password" id="password" name="password"/>
			<div class="clear"></div>
			
			<label for="remember_me" style="padding: 0;">Remember me?</label>
			<input type="checkbox" id="remember_me" style="position: relative; top: 3px; margin: 0; " name="remember_me"/>
			<div class="clear"></div>
			
			<br />
			<input type="submit" id="commit" style="margin: -20px 0 0 287px;" class="button" name="commit" value="Log in" runat="server" onserverclick="commit_click" />	
		</fieldset>
	</form>
	
</body>
</html>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div >
</div>
<p style="text-align: center; background-color: ThreeDShadow;">
    Copyright by Winanjaya</p>
< /asp:Content>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform