Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how can add javascript code ?? Pin
Nitin S9-May-11 19:19
professionalNitin S9-May-11 19:19 
GeneralRe: how can add javascript code ?? Pin
lolostar9-May-11 20:10
lolostar9-May-11 20:10 
GeneralRe: how can add javascript code ?? Pin
Nitin S9-May-11 20:13
professionalNitin S9-May-11 20:13 
GeneralRe: how can add javascript code ?? Pin
Ali Al Omairi(Abu AlHassan)9-May-11 22:08
professionalAli Al Omairi(Abu AlHassan)9-May-11 22:08 
AnswerRe: how can add javascript code ?? Pin
Prasanta_Prince9-May-11 21:03
Prasanta_Prince9-May-11 21:03 
QuestionDatabase audit/journaling Pin
vanikanc9-May-11 8:09
vanikanc9-May-11 8:09 
AnswerRe: Database audit/journaling Pin
Ennis Ray Lynch, Jr.9-May-11 8:21
Ennis Ray Lynch, Jr.9-May-11 8:21 
QuestionASP & JavaScript Pin
future38397-May-11 1:56
future38397-May-11 1:56 
Hi,
I have a few textbox on my form and would like to validate it through Java script. I know there is RequiredFieldValidator in asp.net but I would like to do that by Javascript.
this is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="WebApplication1.Presentation.Register" %>

<!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></title>
    <script language= "javascript" type="text/javascript"></script>
    

    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
        }
        .style3
        {
            width: 153px;
            height: 17px;
        }
        .style5
        {
            width: 151px;
        }
        .style6
        {
            width: 91px;
        }
        .style7
        {
            height: 23px;
        }
        .style8
        {
            height: 26px;
        }
        .style9
        {
            height: 25px;
        }
        .style10
        {
            width: 151px;
            height: 23px;
        }
        .style11
        {
            width: 91px;
            height: 23px;
        }
    </style>
    <script language="javascript" type="text/javascript">
// <![CDATA[

        function StId_txt_onclick() {

        }

// ]]>
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table class="style1">
            <tr>
                <td colspan="4" class="style7">
                    <asp:Label ID="PrsnInfo_lbl" runat="server" Text="Personal Information"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style9">
                    <asp:Label ID="StId_lbl" runat="server" Text="Student ID" Font-Names="Arial" 
                        Font-Size="Smaller"></asp:Label>
                </td>
                <td class="style9" colspan="3">
                    <input id="StId_txt" runat="server"
                        style="border: 0.3px inset #000000; height: 20px; width: 137px;" type="text" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate= "StId_txt" ForeColor ="red" 
                        ErrorMessage="Srudent ID is required!" Font-Names="Arial" Font-Size="Smaller"></asp:RequiredFieldValidator>

                </td>
       </table>
    
    </div>
    </form>
</body>
</html>


do you have any idea or sample please?
AnswerRe: ASP & JavaScript Pin
Luc Pattyn7-May-11 2:20
sitebuilderLuc Pattyn7-May-11 2:20 
AnswerRe: ASP & JavaScript Pin
keyur satyadev7-May-11 2:40
keyur satyadev7-May-11 2:40 
Questionregular expression Pin
fififlowertot5-May-11 23:00
fififlowertot5-May-11 23:00 
AnswerRe: regular expression Pin
Sneha Bisht5-May-11 23:38
Sneha Bisht5-May-11 23:38 
GeneralRe: regular expression Pin
Sneha Bisht5-May-11 23:45
Sneha Bisht5-May-11 23:45 
AnswerRe: regular expression Pin
Ravi Sant6-May-11 1:03
Ravi Sant6-May-11 1:03 
AnswerRe: regular expression Pin
AspDotNetDev6-May-11 7:47
protectorAspDotNetDev6-May-11 7:47 
QuestionAjaxControlToolkit behaviour Pin
vanikanc5-May-11 10:39
vanikanc5-May-11 10:39 
AnswerRe: AjaxControlToolkit behaviour Pin
Prasanta_Prince6-May-11 7:14
Prasanta_Prince6-May-11 7:14 
GeneralRe: AjaxControlToolkit behaviour Pin
vanikanc6-May-11 10:45
vanikanc6-May-11 10:45 
GeneralRe: AjaxControlToolkit behaviour Pin
Herman<T>.Instance17-May-11 4:43
Herman<T>.Instance17-May-11 4:43 
Questionvalidate textbox Pin
jashimu5-May-11 4:24
jashimu5-May-11 4:24 
AnswerRe: validate textbox Pin
Not Active5-May-11 4:51
mentorNot Active5-May-11 4:51 
AnswerRe: validate textbox Pin
Prasanta_Prince5-May-11 5:02
Prasanta_Prince5-May-11 5:02 
GeneralRe: validate textbox Pin
jashimu5-May-11 7:49
jashimu5-May-11 7:49 
GeneralRe: validate textbox Pin
AspDotNetDev5-May-11 8:25
protectorAspDotNetDev5-May-11 8:25 
QuestionGridView Paging Pin
fififlowertot4-May-11 23:06
fififlowertot4-May-11 23:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.