Click here to Skip to main content
14,661,076 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi am working in Am having one html file also i could convert it to aspx file but the textbox styles doesn't matched because of the jquery. So i add the html file to my project. Then it displays properly.. There is a button 'Enter', here i want to write the code on Enter button...Is it possible?? Can anyone help me..

login.html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IN ADMIN PANEL | Powered by INDEZINER</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript">
    headerclass: "submenuheader", //Shared CSS class name of headers group
    contentclass: "submenu", //Shared CSS class name of contents group
    revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
    defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
    onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    animatedefault: false, //Should contents open by default be animated into view?
    persiststate: true, //persist state of opened contents within browser session?
    toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
        //do nothing
    onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
        //do nothing

<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">

    $(document).ready(function() {


<script language="javascript" type="text/javascript" src="niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" />

<div id="main_container">

    <div class="header_login">
    <div class="logo"><a href="#"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>


         <div class="login_form">

         <h3>Admin Panel Login</h3>

         <a href="#" class="forgot_pass">Forgot password</a>

         <form action="" method="post" class="niceform">

                        <dt><label for="email">Username:</label></dt>
                        <dd><input type="text" name="" id="" size="54" /></dd>
                        <dt><label for="password">Password:</label></dt>
                        <dd><input type="text" name="" id="" size="54" /></dd>

                    <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Remember me</label>

                     <dl class="submit">
                    <input type="submit" name="submit" id="submit" value="Enter" />



    <div class="footer_login">

        <div class="left_footer_login">IN ADMIN PANEL | Powered by <a href="">INDEZINER</a></div>
        <div class="right_footer_login"><a href=""><img src="images/indeziner_logo.gif" alt="" title="" border="0" /></a></div>



Rate this:
Please Sign up or sign in to vote.

Solution 1

ya possible....

u can write in

<script language="javascript" type="text/javascript" src="niceforms.js">
function submit_onclick() 
//write ur func()
Sasikala Gurusamy 26-Dec-12 7:05am
How can i retrive my database values here??
Deenuji 26-Dec-12 7:09am
u doing this program in or pure html??????
Sasikala Gurusamy 27-Dec-12 0:07am
Rate this:
Please Sign up or sign in to vote.

Solution 2

you can used click event in code behind

you can add runat="server" id="btnname" it is more easier
Rate this:
Please Sign up or sign in to vote.

Solution 3

You can not write server-side event on this page. You have to post your data to a form that can interact with the server(an aspx page in your case)

change your line of code:
<form action="" method="post" class="niceform">

<form action="Enter.aspx" method="post" class="niceform">

Then on page load event of Enter.aspx page write:

NameValueCollection frm = Request.Form;
string userName, password;
userName = frm ["UserName"];
password = frm ["Password"];

This way you can access the entered values on your HTML form and perform the operation on server.
Remember, to pass the values of username and password you must use "name" attributes. In your HTML name attribute is blank

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100