Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

can some one point out the error in this code

Posted on 2014-08-13
4
Medium Priority
?
132 Views
Last Modified: 2014-09-04
I typed this from a book I'm using to learn ASP.net, but when I run it, it shows the typed code and not the page.  If I copy the code from the CD and compare it, it is exactly the same, but the copied version runs.

gary

<%@ Page Language="VB" %>
<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    Sub Button_Click(ByVal sender as Object, ByVal e as EventArgs)
    Dim btn as Button = CType(sender, Button)
    btn.Text = (int32Parse(btn.Text) + 1.ToString()
    end Sub
</script>
<html xmlns=http://www.w3.org/1999/xhtml"  >
<head id="Head1"  runat="server" >
<title>Button Counters</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    First Counter:
    <asp:Button
        id="Button1"
        Text="0"
        OnClick="Button_Click"
        Runat="server" />
<br /> <br />
Second Counter:
<asp:Button
        id="Button2"
Text="0"
        OnClick="Button_Click"
        Runat="server" />
</div>
</form>
</body>
</html>
0
Comment
Question by:javagair
  • 2
  • 2
4 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40259679
Are you actually running this through your server
I assume this is on your local pc so you should be using something like

http://localhost/yourpage.aspx
0
 
LVL 58

Accepted Solution

by:
Gary earned 1000 total points
ID: 40261395
What are you running this through - Visual Studio?
0
 

Author Closing Comment

by:javagair
ID: 40304427
visual studio problem
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

      Install BugTracker on Windows 2008 server Step 1:  Install windows 2008 server 32 bit OS and configure IIS. Step 2:  Install SQL server ( SQL server 2005 or SQL server 2005 Express edition. The installer for 2008  version isn’t very f…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 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