HellowWorld.aspx

daspnet

New Member
Messages
4
Reaction score
0
Points
0
I copied the code from...
http://x10hosting.com/forums/tutorials/102062-how-get-asp-net-work-x10hosting.html

...but I changed this line...
Partial Class _Default Inherits System.Web.UI.Page
...changed to...
PartialClass HelloWorld Inherits System.Web.UI.Page

...runs fine in Microsoft Web Developer Express, and does not work from this link...
http://daspnet.x10.mx/day1b/HelloWorld.aspx
...PROBLEM: the web browser acts like it never even finds the file.

..this works...
http://daspnet.x10.mx/day1b/test.htm

I never saw web.config anywhere.
Here is the HelloWorld.aspx...
<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="HelloWorld.aspx.vb"Inherits="HelloWorld" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
htmlxmlns="http://www.w3.org/1999/xhtml">
<
headid="Head1"runat="server">
<title>Hello World!</title>
</head>
<
body>
<formid="form1"runat="server">
<div>
<asp:LabelID="Label1"runat="server"Text="Erm, Hello World!"></asp:Label>
<br/><br/>
<asp:ButtonID="Button1"runat="server"onclick="Button1_Click"Text="Press Me"/>
</div>
</form>
</
body>
</html>

Here is the HelloWorld.aspx.vb...
PartialClass HelloWorld
Inherits System.Web.UI.Page
ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As EventArgs)
Label1.Text = "ASP.Net post test Worked"
EndSub
End
Class
 

daspnet

New Member
Messages
4
Reaction score
0
Points
0
Thanks, but thats not it. My source code does have the spaces.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You should use
Code:
, [html] or [php] tags (as appropriate) so we can better see what actual code you are using, otherwise we're working from incomplete and incorrect information. Note that the problem isn't that the browser isn't finding http://daspnet.x10.mx/day1b/HelloWorld.aspx, it's that the server is dropping the connection, which usually means there's either something wrong with the script or with the server configuration. Check your error logs for anything interesting (missing favicon.ico isn't interesting).
 
Last edited:

herbozo2

New Member
Messages
7
Reaction score
0
Points
0
I was having a similar problem, I was doing a simple test by putting an asp.net page in my account, and sometimes it worked and sometimes it didn't. and I decided to give up and put a plain html page. I will keep trying with asp.net later though. good luck
 
Top