Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > ASP and ASP.NET
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 05-31-2002, 10:55 PM
  #1
kycable
Battler (Level 3)
 
kycable's Avatar
 
Join Date: Oct 2001
Location: Kentucky, USA
Posts: 26
iTrader: (0)
kycable is on a distinguished road
Question ASP vs. ASP.net

Although this seems like such a redundent question, This .NET is rather new, although from my understanding that it fairly resembles ASP, I am not sure if my server hosting company supports ASP.Net. I am fairly decent with ASP.

I know that an easy way to see if your server supports ASP is basically make a blank page and place this in it:

<% response.write "Hello World" %>

(There are probably a million other ways to do the same test, although this is just a simple example.)

For the same concept, is there a way you can test for .Net?
kycable is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-01-2002, 11:46 PM
  #2
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,864
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
.net is basically vb7. it is mostly vb for the web. .net is like vb but a little bit different. I don't know anything about asp.net if it is the same or not, but I know vb and that is what I have learned.
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-01-2002, 11:52 PM
  #3
kycable
Battler (Level 3)
 
kycable's Avatar
 
Join Date: Oct 2001
Location: Kentucky, USA
Posts: 26
iTrader: (0)
kycable is on a distinguished road
Well I apperciate the info, although I have learned quite a bit with the 131 Meg download for adding .net to your server.

I have noticed that <% Response.Write "Hello World" %> does not work in .net

I am very impressed with the error control .net offers. It is full of information. To do the samething (just to display Hello World in .net) you have to have this:

<% Response.Write ("Hello World") %>

I have installed on my server, the user configurable portal site and learning quite a bit. Although I won't publish it until I have it finished and working correctly.

This is VERY interesting stuff here.

Thanks for the reply.
kycable is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-01-2002, 11:56 PM
  #4
kycable
Battler (Level 3)
 
kycable's Avatar
 
Join Date: Oct 2001
Location: Kentucky, USA
Posts: 26
iTrader: (0)
kycable is on a distinguished road
A sample error

Since I found an error rather quickly, I thought I would post what the screen looks like when an error is occured: (This is right in the browser)

Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30466: Namespace or type 'PortalModulePage' for the Imports 'PortalModulePage' cannot be found.

Source Error:



Line 5: Imports System.Web.UI.HtmlControls
Line 6: Imports System.Web.UI.WebControls
Line 7: Imports PortalModulePage
Line 8: Imports Microsoft.VisualBasic
Line 9:


Source File: D:\webzonecomplete\all-in-one-site\Default.vb Line: 7



Show Detailed Compiler Output:


C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\root\0060ef50\9f24f1c8\pnjkhdbi.dll" /debug- "D:\webzonecomplete\all-in-one-site\Default.vb"


Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705.209
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

D:\webzonecomplete\all-in-one-site\Default.vb(7) : error BC30466: Namespace or type 'PortalModulePage' for the Imports 'PortalModulePage' cannot be found.

Imports PortalModulePage
~~~~~~~~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(10) : error BC30002: Type 'PortalModulePage' is not defined.

Public Class DefaultPage : Inherits PortalModulePage
~~~~~~~~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(29) : error BC30451: Name 'Request' is not declared.

If (Request.QueryString.Item("_PageIndex") <> "") Then
~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(30) : error BC30451: Name 'Request' is not declared.

SetPageIndex(Request.QueryString.Item("_PageIndex"))
~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(31) : error BC30451: Name 'Request' is not declared.

PageIndex = Int32.Parse(Request.QueryString("_PageIndex"))
~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(32) : error BC30451: Name 'Request' is not declared.

ElseIf (Not Request.Cookies("_PageIndex") Is Nothing) Then
~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(33) : error BC30451: Name 'Request' is not declared.

PageIndex = Int32.Parse(Request.Cookies("_PageIndex").Value)
~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(54) : error BC30451: Name 'UserState' is not declared.

BuildModuleList(LeftUIModules, UserState("PageModules_" + PageIndex.ToString() + "L"))
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(55) : error BC30451: Name 'UserState' is not declared.

BuildModuleList(RightUIModules, UserState("PageModules_" + PageIndex.toString() + "R"))
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(56) : error BC30451: Name 'DataBind' is not declared.

DataBind()
~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(58) : error BC30451: Name 'UserState' is not declared.

If (UserState("UserId") = "ANONYMOUS") Then
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(67) : error BC30451: Name 'Response' is not declared.

Response.Redirect("default.aspx")
~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(72) : error BC30451: Name 'UserState' is not declared.

If (String.Compare(UserState("UserId"),"ANONYMOUS") = 0) Then
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(73) : error BC30451: Name 'Response' is not declared.

Response.Redirect("login.aspx")
~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(75) : error BC30451: Name 'UserState' is not declared.

Dim pageNames As String = UserState("PageNames") + ";New Page"
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(80) : error BC30451: Name 'UserState' is not declared.

UserState("PageNames") = pageNames
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(81) : error BC30451: Name 'Response' is not declared.

Response.Redirect("restricted/customize.aspx")
~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(91) : error BC30451: Name 'Response' is not declared.

Response.AppendCookie(PageIndex)
~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(107) : error BC30469: Reference to a non-shared member requires an object reference.

Dim UIModule As Control = Page.LoadControl(moduleSource)
~~~~~~~~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(118) : error BC30451: Name 'UserState' is not declared.

Dim pageNames As String = UserState("PageNames")
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(137) : error BC30451: Name 'UserState' is not declared.

container.InnerHtml += "<td align=center bgcolor='" + UserState("HeadColor") + "' width='20%'>"
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(138) : error BC30451: Name 'UserState' is not declared.

container.InnerHtml += " <table bgcolor='" + UserState("HeadColor") + "' border=0 width='100%' cellspacing=0 cellpadding=2>"
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(146) : error BC30451: Name 'UserState' is not declared.

container.InnerHtml += "<td align=center bgcolor='" + UserState("SubheadColor") + "' width='20%'>"
~~~~~~~~~
D:\webzonecomplete\all-in-one-site\Default.vb(147) : error BC30451: Name 'UserState' is not declared.

container.InnerHtml += " <table bgcolor='" + UserState("SubheadColor") + "' border=0 width='100%' cellspacing=0 cellpadding=2>"
kycable is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-01-2002, 11:57 PM
  #5
kycable
Battler (Level 3)
 
kycable's Avatar
 
Join Date: Oct 2001
Location: Kentucky, USA
Posts: 26
iTrader: (0)
kycable is on a distinguished road
The rest of the information:

~~~~~~~~~
Show Complete Compilation Source:


Line 1: Imports System
Line 2: Imports System.Web
Line 3: Imports System.Collections
Line 4: Imports System.Web.UI
Line 5: Imports System.Web.UI.HtmlControls
Line 6: Imports System.Web.UI.WebControls
Line 7: Imports PortalModulePage
Line 8: Imports Microsoft.VisualBasic
Line 9:
Line 10: Public Class DefaultPage : Inherits PortalModulePage
Line 11:
Line 12: Public anchorDelete as HtmlAnchor
Line 13: Public anchorCustomize as HtmlAnchor
Line 14: Public anchorOptions as HtmlAnchor
Line 15: Public anchorOptions2 as HtmlAnchor
Line 16: Public anchorAdd as HtmlAnchor
Line 17: Public spanAdd as Label
Line 18: Public spanDelete as Label
Line 19: Public PagePanelLinks As HtmlContainerControl
Line 20: Public LeftUIModules As PlaceHolder
Line 21: Public RightUIModules As PlaceHolder
Line 22: Public Login as Panel
Line 23:
Line 24: Protected Sub Page_Load(sender As Object, e As EventArgs)
Line 25:
Line 26: Dim PageIndex as Long = 0
Line 27: Dim myPage as Page = CType(sender, Page)
Line 28:
Line 29: If (Request.QueryString.Item("_PageIndex") <> "") Then
Line 30: SetPageIndex(Request.QueryString.Item("_PageIndex"))
Line 31: PageIndex = Int32.Parse(Request.QueryString("_PageIndex"))
Line 32: ElseIf (Not Request.Cookies("_PageIndex") Is Nothing) Then
Line 33: PageIndex = Int32.Parse(Request.Cookies("_PageIndex").Value)
Line 34: End If
Line 35:
Line 36:
Line 37: If (PageIndex <> 0) Then
Line 38: anchorDelete.Visible = True
Line 39: spanDelete.Visible = True
Line 40: Else
Line 41: anchorDelete.Visible = False
Line 42: spanDelete.Visible = False
Line 43: End If
Line 44:
Line 45: anchorDelete.HRef = "restricted/deletepage.aspx"
Line 46: anchorCustomize.HRef = "customize.aspx"
Line 47: anchorOptions.HRef = "restricted/options.aspx"
Line 48: anchorOptions2.HRef = "restricted/layout.aspx"
Line 49:
Line 50: 'Dynamically Construct Page Hyperlink List
Line 51: BuildPaneLinkList(PagePanelLinks, PageIndex)
Line 52:
Line 53: 'Dynamically Construct Module List for Current Page
Line 54: BuildModuleList(LeftUIModules, UserState("PageModules_" + PageIndex.ToString() + "L"))
Line 55: BuildModuleList(RightUIModules, UserState("PageModules_" + PageIndex.toString() + "R"))
Line 56: DataBind()
Line 57:
Line 58: If (UserState("UserId") = "ANONYMOUS") Then
Line 59: Login.Visible=True
Line 60: End If
Line 61:
Line 62: End Sub
Line 63:
Line 64: Protected Sub SignOff_Click(myPage As Object, e As EventArgs)
Line 65: SetPageIndex("0")
Line 66: System.Web.Security.FormsAuthentication.SignOut()
Line 67: Response.Redirect("default.aspx")
Line 68: End Sub
Line 69:
Line 70: Protected Sub AddPage_Click(sender As Object, e As EventArgs)
Line 71:
Line 72: If (String.Compare(UserState("UserId"),"ANONYMOUS") = 0) Then
Line 73: Response.Redirect("login.aspx")
Line 74: Else
Line 75: Dim pageNames As String = UserState("PageNames") + ";New Page"
Line 76: Dim pageList() As String = Split(pageNames, ";")
Line 77: Dim numPages As Long = pageList.Length - 1
Line 78:
Line 79: SetPageIndex(numPages.ToString())
Line 80: UserState("PageNames") = pageNames
Line 81: Response.Redirect("restricted/customize.aspx")
Line 82: End If
Line 83: End Sub
Line 84:
Line 85: Private Sub SetPageIndex(value as String)
Line 86:
Line 87: Dim PageIndex As HttpCookie = New HttpCookie("_PageIndex", value)
Line 88:
Line 89: PageIndex.Path = "/"
Line 90: PageIndex.Expires = New DateTime(2002, 10, 10)
Line 91: Response.AppendCookie(PageIndex)
Line 92:
Line 93: End Sub
Line 94:
Line 95: Private Sub BuildModuleList(parent as Control, Modules As String)
Line 96:
Line 97: If (Modules = "") Then Return
Line 98:
Line 99: Dim ModuleList() As String = Split(Modules, ";")
Line 100: Dim i as Integer
Line 101:
Line 102: For i=0 To ModuleList.Length-1
Line 103:
Line 104: Dim moduleSource as String = ModuleList(i)
Line 105:
Line 106: If ((moduleSource <> "") And (moduleSource <> "System.DBNull")) Then
Line 107: Dim UIModule As Control = Page.LoadControl(moduleSource)
Line 108: parent.Controls.Add(New LiteralControl("<tr><td>"))
Line 109: parent.Controls.Add(UIModule)
Line 110: parent.Controls.Add(New LiteralControl("</td></tr>"))
Line 111: End If
Line 112: Next i
Line 113:
Line 114: End Sub
Line 115:
Line 116: Private Sub BuildPaneLinkList(container As HtmlContainerControl, currentPageIndex as Long)
Line 117:
Line 118: Dim pageNames As String = UserState("PageNames")
Line 119: if (pageNames = "") Then Return
Line 120:
Line 121: Dim pageList() As String = Split(pageNames, ";")
Line 122:
Line 123: If (pageList.Length > 2) Then
Line 124: anchorAdd.Visible = False
Line 125: spanAdd.Visible = False
Line 126: else
Line 127: anchorAdd.Visible = True
Line 128: spanAdd.Visible = True
Line 129: End If
Line 130:
Line 131: Dim i as Integer
Line 132:
Line 133: For i=0 To pageList.Length-1
Line 134: If (pageList(i) = "") Then Exit For
Line 135:
Line 136: If (i = currentPageIndex) Then
Line 137: container.InnerHtml += "<td align=center bgcolor='" + UserState("HeadColor") + "' width='20%'>"
Line 138: container.InnerHtml += " <table bgcolor='" + UserState("HeadColor") + "' border=0 width='100%' cellspacing=0 cellpadding=2>"
Line 139: container.InnerHtml += " <tr align=center>"
Line 140: container.InnerHtml += " <td></a><font face=Arial color='white'><b>&nbsp;"+pageList(i)+"</b></font>&nbsp;</td>"
Line 141: container.InnerHtml += " </tr>"
Line 142: container.InnerHtml += " </table>"
Line 143: container.InnerHtml += "</td>"
Line 144: container.InnerHtml += "<td width='1%'>&nbsp;</td>"
Line 145: Else
Line 146: container.InnerHtml += "<td align=center bgcolor='" + UserState("SubheadColor") + "' width='20%'>"
Line 147: container.InnerHtml += " <table bgcolor='" + UserState("SubheadColor") + "' border=0 width='100%' cellspacing=0 cellpadding=2>"
Line 148: container.InnerHtml += " <tr align=center>"
Line 149: container.InnerHtml += " <td><font face=Arial size=-1>&nbsp;<a href='default.aspx?_PageIndex=" + i.ToString() + "'>"+pageList(i)+"</a></font>&nbsp;</td>"
Line 150: container.InnerHtml += " </tr>"
Line 151: container.InnerHtml += " </table>"
Line 152: container.InnerHtml += "</td>"
Line 153: container.InnerHtml += "<td width='1%'>&nbsp;</td>"
Line 154: End If
Line 155: Next i
Line 156: End Sub
Line 157:
Line 158: End Class





--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.209; ASP.NET Version:1.0.3705.0
kycable is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-02-2002, 12:10 AM
  #6
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,864
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
all that for some little error, I can do without. work out the bugs and then let me know. I will stick with vb6
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart



 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 06:56 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.