I was having problems using my local IIS to display asp.net pages, or any
pages for that matter. I actually reinstalled IIS and then uninstalled the
..net framework and reinstalled it. All pages now work including my asp.net
pages sort of....... What I mean is the page now displays without a server
unavailable error (I resolved this by putting asp.net permissions on the
folder containing the aspx pages). However when I point IIS at that folder
and run the page I see the page but it doesn't respond to any events e.g. I
have created a basic web page with a button, which should run a
response.write line of code. This works when I preview it in the Cassini web
server via VS but not IIS. What obvious thing am I doing wrong? :) Regards,
Chris. 5 1209
re:
!I see the page but it doesn't respond to any events
!I have created a basic web page with a button, which should run a
!response.write line of code.
How are you wiring the button ? Can you post the failing code ?
Here's a simple page which tests several events and runs code when a button is pushed:
helloworld.aspx :
-----------------------
<%@ Page Language="VB" EnableViewState ="false" trace="true" %>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
Trace.Write("Be gin PreInit", Now)
Trace.Write("En d Render", Now)
End Sub
Sub Button1_Click(s ender As Object, e As EventArgs)
Label1.Text = "Hello, " & TextBox1.Text & "! Welcome to a Hello World ASP.NET example."
End Sub
</script>
<html>
<body>
<form runat="server">
<p>
<asp:Label id="Label1" runat="server"> Write your name inthe textbox and click the
button.</asp:Label>
</p>
<p>
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
</p>
<p>
<asp:Button id="Button1" onclick="Button 1_Click" runat="server" Text="Button">
</asp:Button>
</p>
</form>
</body>
</html>
-------------------
Run that and let us know if it works...
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Chris" <no****@nospam. comwrote in message news:O2******** ******@TK2MSFTN GP03.phx.gbl...
>I was having problems using my local IIS to display asp.net pages, or any pages for that matter. I actually reinstalled IIS and then uninstalled the .net framework and reinstalled it. All pages now work including my asp.net pages sort of....... What I mean is the page now displays without a server unavailable error (I resolved this by putting asp.net permissions on the folder containing the aspx pages). However when I point IIS at that folder and run the page I see the page but it doesn't respond to any events e.g. I have created a basic web page with a button, which should run a response.write line of code. This works when I preview it in the Cassini web server via VS but not IIS. What obvious thing am I doing wrong? :) Regards, Chris.
The button doesn't work. The code in on load event does but the button
doesn't?? Weird. Here is the failing code. Bear in mind I have been
reinstalling things (see first post and the one I made a little earlier that
you responded to) so I don't know whether I have inadvertantly done
something. Could there be something in the web.config or machine.config.
Thanks Juan.
<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb"
Inherits="_Defa ult" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" /></div>
</form>
</body>
</html>
Partial Class _Default
Inherits System.Web.UI.P age
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
Response.Write( "test")
End Sub
End Class
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
re:
!I see the page but it doesn't respond to any events
!I have created a basic web page with a button, which should run a
!response.write line of code.
How are you wiring the button ? Can you post the failing code ?
Here's a simple page which tests several events and runs code when a
button is pushed:
helloworld.aspx :
-----------------------
<%@ Page Language="VB" EnableViewState ="false" trace="true" %>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
Trace.Write("Be gin PreInit", Now)
Trace.Write("En d Render", Now)
End Sub
Sub Button1_Click(s ender As Object, e As EventArgs)
Label1.Text = "Hello, " & TextBox1.Text & "! Welcome to a Hello World
ASP.NET example."
End Sub
</script>
<html>
<body>
<form runat="server">
<p>
<asp:Label id="Label1" runat="server"> Write your name inthe textbox and
click the button.</asp:Label>
</p>
<p>
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
</p>
<p>
<asp:Button id="Button1" onclick="Button 1_Click" runat="server"
Text="Button">
</asp:Button>
</p>
</form>
</body>
</html>
-------------------
Run that and let us know if it works...
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Chris" <no****@nospam. comwrote in message
news:O2******** ******@TK2MSFTN GP03.phx.gbl...
>>I was having problems using my local IIS to display asp.net pages, or any pages for that matter. I actually reinstalled IIS and then uninstalled the .net framework and reinstalled it. All pages now work including my asp.net pages sort of....... What I mean is the page now displays without a server unavailable error (I resolved this by putting asp.net permissions on the folder containing the aspx pages). However when I point IIS at that folder and run the page I see the page but it doesn't respond to any events e.g. I have created a basic web page with a button, which should run a response.writ e line of code. This works when I preview it in the Cassini web server via VS but not IIS. What obvious thing am I doing wrong? :) Regards, Chris.
re:
!The button doesn't work. The code in on load event does but the button
!doesn't?? Weird. Here is the failing code.
<asp:Button ID="Button1" runat="server" Text="Button" />
Not weird at all. You aren't wiring the OnClick event to the code.
Use :
<asp:Button ID="Button1" runat="server" OnClick="Button 1_Click" Text="Button" />
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Chris" <no****@nospam. comwrote in message news:u2******** *****@TK2MSFTNG P06.phx.gbl...
The button doesn't work. The code in on load event does but the button doesn't?? Weird. Here is
the failing code. Bear in mind I have been reinstalling things (see first post and the one I made
a little earlier that you responded to) so I don't know whether I have inadvertantly done
something. Could there be something in the web.config or machine.config. Thanks Juan.
<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb" Inherits="_Defa ult" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" /></div>
</form>
</body>
</html>
Partial Class _Default
Inherits System.Web.UI.P age
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s) Handles
Button1.Click
Response.Write( "test")
End Sub
End Class
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>re: !I see the page but it doesn't respond to any events !I have created a basic web page with a button, which should run a !response.writ e line of code.
How are you wiring the button ? Can you post the failing code ?
Here's a simple page which tests several events and runs code when a button is pushed:
helloworld.asp x: ----------------------- <%@ Page Language="VB" EnableViewState ="false" trace="true" %> <script runat="server"> Sub Page_Load(obj as object, e as eventargs) Trace.Write("B egin PreInit", Now) Trace.Write("E nd Render", Now) End Sub
Sub Button1_Click(s ender As Object, e As EventArgs) Label1.Text = "Hello, " & TextBox1.Text & "! Welcome to a Hello World ASP.NET example." End Sub </script> <html> <body> <form runat="server"> <p> <asp:Label id="Label1" runat="server"> Write your name inthe textbox and click the button.</asp:Label> </p> <p> <asp:TextBox id="TextBox1" runat="server"> </asp:TextBox> </p> <p> <asp:Button id="Button1" onclick="Button 1_Click" runat="server" Text="Button"> </asp:Button> </p> </form> </body> </html> -------------------
Run that and let us know if it works...
Juan T. Llibre, asp.net MVP asp.net faq : http://asp.net.do/faq/ foros de asp.net, en español : http://asp.net.do/foros/ ============== =============== ====== "Chris" <no****@nospam. comwrote in message news:O2******** ******@TK2MSFTN GP03.phx.gbl...
>>>I was having problems using my local IIS to display asp.net pages, or any pages for that matter. I actually reinstalled IIS and then uninstalled the .net framework and reinstalled it. All pages now work including my asp.net pages sort of....... What I mean is the page now displays without a server unavailable error (I resolved this by putting asp.net permissions on the folder containing the aspx pages). However when I point IIS at that folder and run the page I see the page but it doesn't respond to any events e.g. I have created a basic web page with a button, which should run a response.write line of code. This works when I preview it in the Cassini web server via VS but not IIS. What obvious thing am I doing wrong? :) Regards, Chris.
"Chris" <no****@nospam. comwrote in message
news:u2******** *****@TK2MSFTNG P06.phx.gbl...
The button doesn't work. The code in on load event does but the button
doesn't?? Weird.
Not weird at all - it's doing exactly what you told it to or, rather, it's
not doing what you haven't told it to...
You've forgotten to specify the server-side method to run in response to the
OnClick event...
<asp:Button ID="Button1" runat="server" Text="Button"
OnClick="Button 1_Click" />
Than kyou Juan. I was runing the pages without building the site. I even
removed the OnClick="Button 1_Click" from my page and it worked. Is this
right? I was under the impression that asp.net does not need to compile the
page if it has a code behind it will do it on the first view of the page. Am
I misunderstandin g something? Thanks for the help Juan.
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
re:
!The button doesn't work. The code in on load event does but the button
!doesn't?? Weird. Here is the failing code.
<asp:Button ID="Button1" runat="server" Text="Button" />
Not weird at all. You aren't wiring the OnClick event to the code.
Use :
<asp:Button ID="Button1" runat="server" OnClick="Button 1_Click"
Text="Button" />
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Chris" <no****@nospam. comwrote in message
news:u2******** *****@TK2MSFTNG P06.phx.gbl...
>The button doesn't work. The code in on load event does but the button doesn't?? Weird. Here is the failing code. Bear in mind I have been reinstalling things (see first post and the one I made a little earlier that you responded to) so I don't know whether I have inadvertantly done something. Could there be something in the web.config or machine.config. Thanks Juan.
<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb" Inherits="_Def ault" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitle d Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" /></div>
</form>
</body>
</html>
Partial Class _Default
Inherits System.Web.UI.P age
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventAr gs) Handles Button1.Click
Response.Write ("test")
End Sub
End Class
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message news:%2******* *********@TK2MS FTNGP05.phx.gbl ...
>>re: !I see the page but it doesn't respond to any events !I have created a basic web page with a button, which should run a !response.wri te line of code.
How are you wiring the button ? Can you post the failing code ?
Here's a simple page which tests several events and runs code when a button is pushed:
helloworld.as px: ----------------------- <%@ Page Language="VB" EnableViewState ="false" trace="true" %> <script runat="server"> Sub Page_Load(obj as object, e as eventargs) Trace.Write(" Begin PreInit", Now) Trace.Write(" End Render", Now) End Sub
Sub Button1_Click(s ender As Object, e As EventArgs) Label1.Text = "Hello, " & TextBox1.Text & "! Welcome to a Hello World ASP.NET example." End Sub </script> <html> <body> <form runat="server"> <p> <asp:Label id="Label1" runat="server"> Write your name inthe textbox and click the button.</asp:Label> </p> <p> <asp:TextBox id="TextBox1" runat="server"> </asp:TextBox> </p> <p> <asp:Button id="Button1" onclick="Button 1_Click" runat="server" Text="Button" > </asp:Button> </p> </form> </body> </html> -------------------
Run that and let us know if it works...
Juan T. Llibre, asp.net MVP asp.net faq : http://asp.net.do/faq/ foros de asp.net, en español : http://asp.net.do/foros/ ============= =============== ======= "Chris" <no****@nospam. comwrote in message news:O2****** ********@TK2MSF TNGP03.phx.gbl. .. I was having problems using my local IIS to display asp.net pages, or any pages for that matter. I actually reinstalled IIS and then uninstall ed the .net framework and reinstalled it. All pages now work including my asp.net pages sort of....... What I mean is the page now displays without a server unavailable error (I resolved this by putting asp.net permissions on the folder containing the aspx pages). However when I point IIS at that folder and run the page I see the page but it doesn't respond to any events e.g. I have created a basic web page with a button, which should run a response.write line of code. This works when I preview it in the Cassini web server via VS but not IIS. What obvious thing am I doing wrong? :) Regards, Chris. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b. Yahoo store was originally written in Lisp.
c. Emacs
The issues with these will probably come up, so I might as well
mention them myself (which will also make this a more balanced
|
by: Shufen |
last post by:
Hi,
I'm a newbie that just started to learn python, html and etc. I have
some questions to ask and hope that someone can help me on.
I'm trying to code a python script (with HTML) to get values from a
html form that consists of about 10 checkbox and a textbox where user
have to key in a value to perform a search.
From python tutors, I learned that I have to use the following method:
|
by: bearophile |
last post by:
Ville Vainio:
>It's highly typical for the newbies to suggest improvements to the
>language. They will usually learn that they are wrong, but the
>discussion that ensues can be fruitfull anyway :-).
Few more notes on the language. I don't know if I can really suggest
improvements to the language... but I hope to learn something :-)
I think some things are better in Delphi/Pascal (like the := for
assignments instead of = and = for...
|
by: sudeep |
last post by:
Implementation of BigInt
Problem Statement
The int basic data type provided by the C/C++ language to represent
integers has the following limitations, viz., the size of the data
type is machine dependent and also is limited in the smallest and
largest integer that it can represent.
In this assignment you have to implement a class BigInt, which allows
a programmer to declare and use integers of arbitrary length. You have
|
by: Eric Newton |
last post by:
VB's more declarative nature of handling events is golden. I'm hoping C#
will acquire this type of deal, in addition to the anonymous delegates.
could do same as vb (actually would be easier to parse then vb due to
braces) whereas you look for Handles keyword after method sig, but before
opening brace of the method.
compiler would implicitly build event handling code for all typed
constructions, ie, any variables instances constructed...
| |
by: multiformity |
last post by:
So I have been working on an opensource project for a while, and
decided to really try to make it look better after focusing on the
functionality most of this time. Up to now, I have simply used a
standard ASPX page with minor modifications to it. All of my pages
inherit from a "BasePage.cs" class, that handles common things like
getting the user's information out of the session, determines if a page
should or should not be password...
|
by: Ben Finney |
last post by:
Howdy all,
On dirtSimple.org, PJE wrote:
"Why is Python "blessed" with so much reinvention? Because it's
often cheaper to rewrite than to reuse. Python code is easy to
write, but hard to depend on. You pretty much have to:
1. limit yourself to platforms with a suitable packaging
system,
|
by: Gellert, Andre |
last post by:
Hello,
we installed a new Postgres 7.4.0 on a Suse 9 system.
This is used as a part of an extranet , based on Apache+PHP and has besides
a ldap
server no services running. The system has dual xeon 2ghz and 2GB RAM.
When migrating all applications from 2 other postgres7.2 servers to the new
one,
we had heavy load problems.
At the beginning there where problems with to much allocated shared memory,
as the system was swapping 5-10 mb / sec...
|
by: istillshine |
last post by:
There are many languages around: C++, JAVA, PASCAL, and so on. I
tried to learn C++ and JAVA, but ended up criticizing them. Is it
because C was my first programming language?
I like C because, comparatively, it is small, efficient, and able to
handle large and complex tasks.
I could not understand why people are using and talking about other
programming languages.
|
by: Petr Vileta \(fidokomik\) |
last post by:
I have a form with few text inputs. Every text input is followed by image type
input. In this form I want to have 1 submit button on the top. A problem I want
to resolve is: when user type something into text input and press enter then I
want to submit form by image type button but not by submit button. I tried to
use tabindex parameter but this not work as I expect.
Any idea?
Code example:...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |