473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

More Problems with IIS

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.
Apr 22 '07 #1
5 1192
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("Begin PreInit", Now)
Trace.Write("End Render", Now)
End Sub

Sub Button1_Click(sender 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="Button1_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**************@TK2MSFTNGP03.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.

Apr 22 '07 #2
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="Default.aspx.vb"
Inherits="_Default" %>

<!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>Untitled 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.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

Response.Write("test")

End Sub

End Class
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.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("Begin PreInit", Now)
Trace.Write("End Render", Now)
End Sub

Sub Button1_Click(sender 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="Button1_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**************@TK2MSFTNGP03.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.


Apr 22 '07 #3
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="Button1_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*************@TK2MSFTNGP06.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="Default.aspx.vb" Inherits="_Default" %>

<!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>Untitled 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.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Button1.Click

Response.Write("test")

End Sub

End Class
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.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("Begin PreInit", Now)
Trace.Write("End Render", Now)
End Sub

Sub Button1_Click(sender 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="Button1_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**************@TK2MSFTNGP03.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.



Apr 22 '07 #4
"Chris" <no****@nospam.comwrote in message
news:u2*************@TK2MSFTNGP06.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="Button1_Click" />
Apr 22 '07 #5
Than kyou Juan. I was runing the pages without building the site. I even
removed the OnClick="Button1_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 misunderstanding something? Thanks for the help Juan.

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP03.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="Button1_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*************@TK2MSFTNGP06.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="Default.aspx.vb"
Inherits="_Default" %>

<!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>Untitled 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.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

Response.Write("test")

End Sub

End Class
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.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("Begin PreInit", Now)
Trace.Write("End Render", Now)
End Sub

Sub Button1_Click(sender 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="Button1_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**************@TK2MSFTNGP03.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.



Apr 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
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....
4
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...
22
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...
6
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...
2
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...
14
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...
16
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...
4
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...
151
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...
7
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.