Click here to Skip to main content
15,924,935 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionCreating HTML Page with XSLT and XML Pin
FJJCENTU3-Dec-09 7:02
FJJCENTU3-Dec-09 7:02 
AnswerRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur3-Dec-09 11:26
professionalAbhishek Sur3-Dec-09 11:26 
GeneralRe: Creating HTML Page with XSLT and XML Pin
FJJCENTU3-Dec-09 13:04
FJJCENTU3-Dec-09 13:04 
GeneralRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur3-Dec-09 23:38
professionalAbhishek Sur3-Dec-09 23:38 
GeneralRe: Creating HTML Page with XSLT and XML Pin
FJJCENTU4-Dec-09 5:17
FJJCENTU4-Dec-09 5:17 
GeneralRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur6-Dec-09 20:52
professionalAbhishek Sur6-Dec-09 20:52 
Questiondoesn't exist in the current context. Pin
FEMDEV3-Dec-09 6:29
FEMDEV3-Dec-09 6:29 
AnswerRe: doesn't exist in the current context. Pin
Gamzun3-Dec-09 8:20
Gamzun3-Dec-09 8:20 
AnswerRe: doesn't exist in the current context. Pin
Abhishek Sur3-Dec-09 11:16
professionalAbhishek Sur3-Dec-09 11:16 
GeneralRe: doesn't exist in the current context. Pin
FEMDEV3-Dec-09 22:37
FEMDEV3-Dec-09 22:37 
QuestionGet the first and last row for each child row Pin
AsianRogueOne3-Dec-09 6:12
AsianRogueOne3-Dec-09 6:12 
AnswerRe: Get the first and last row for each child row Pin
Abhishek Sur3-Dec-09 11:05
professionalAbhishek Sur3-Dec-09 11:05 
GeneralRe: Get the first and last row for each child row Pin
AsianRogueOne4-Dec-09 4:46
AsianRogueOne4-Dec-09 4:46 
GeneralRe: Get the first and last row for each child row Pin
AsianRogueOne4-Dec-09 5:07
AsianRogueOne4-Dec-09 5:07 
GeneralRe: Get the first and last row for each child row Pin
Abhishek Sur6-Dec-09 21:06
professionalAbhishek Sur6-Dec-09 21:06 
AnswerRe: Get the first and last row for each child row Pin
AsianRogueOne10-Dec-09 6:56
AsianRogueOne10-Dec-09 6:56 
QuestionHow to Trace variables ? [modified] Pin
alaminfad3-Dec-09 5:14
alaminfad3-Dec-09 5:14 
AnswerRe: How to Trace variables ? Pin
Gamzun3-Dec-09 8:14
Gamzun3-Dec-09 8:14 
QuestionHiding AJAX extender icon Pin
dptalt3-Dec-09 2:14
dptalt3-Dec-09 2:14 
AnswerRe: Hiding AJAX extender icon Pin
Abhishek Sur3-Dec-09 2:29
professionalAbhishek Sur3-Dec-09 2:29 
Questionusing javascript to check validation in aspx page Pin
Member 47041433-Dec-09 0:07
Member 47041433-Dec-09 0:07 
Hi all,

I am a beginner in javascript, and now I am trying to use it to check validation for an aspx page. I have a button and a textbox. When the button is clicked, the textbox will be checked wether it is empty or not.

I use the following code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" runat="server">
      function checkValue2( obj)
{
    if (obj.value == "")
        alert ("empty");
    else
        alert ("not empty");
}
</script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>              
        <asp:Button ID="Button1" runat="server" Text="Button"  onclick='checkValue2(forms[0].TextBox1)' />  
    </div>
    </form>
</body>
</html>


And this is the error:

Compiler Error Message: CS1001: Identifier expected

Source Error:



Line 7: <title>Untitled Page</title>
Line 8: <script type="text/javascript" runat="server">
Line 9: function checkValue2( obj)Line 10: {
Line 11: if (obj.value == "")

Could you tell me how can I fix this error?

Thank kiu so much!
AnswerRe: using javascript to check validation in aspx page Pin
Abhijit Jana3-Dec-09 0:21
professionalAbhijit Jana3-Dec-09 0:21 
GeneralRe: using javascript to check validation in aspx page Pin
Anurag Gandhi3-Dec-09 0:27
professionalAnurag Gandhi3-Dec-09 0:27 
GeneralRe: using javascript to check validation in aspx page Pin
Member 47041433-Dec-09 0:30
Member 47041433-Dec-09 0:30 
GeneralRe: using javascript to check validation in aspx page Pin
Abhijit Jana3-Dec-09 0:50
professionalAbhijit Jana3-Dec-09 0:50 

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.