Fejl i include fil
Hej experterJeg har includeret en breadcrumbfil fra microsoft, men den ser ud til at være lavet i vb og jeg er c#, så jeg kan ikke helt se hvad den brokker sig over, fejlen er følgende:
Compiler Error Message: CS1010: Newline in constant
Source Error:
Line 1: <%
Line 2: ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Line 3: ' Microsoft Content Management Server - Sample Code File
Line 4: '
Line 5: ' This sample code is provided "AS IS" with no warranties, and confers no rights.
Source File: C:\Program Files\Microsoft Content Management Server\Server\IIS_NR\Microsoft Sample Includes\Breadcrumb.inc Line: 3
Hele filen ser således ud:
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Microsoft Content Management Server - Sample Code File
'
' This sample code is provided "AS IS" with no warranties, and confers no rights.
' You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'**********************************************************************************
' File: Breadcrumb.inc
' Author: Microsoft
' Purpose: To provide a visual trail of sub-channels the user has navigated through within a channel.
'**********************************************************************************
' This recursive sub procedure accepts a channel as a parameter. It displays the current channel with
' a trail of channels (that it is nested within) trailing behind it.
Sub Breadcrumb(objChannel)
' If the current channel is not the root channel Then...
If(Not objChannel.isRoot) Then
'Test to see if the channel's parent is the root. If it is then display it as a link
If (objChannel.parent.isRoot) Then
response.write("<a href = """& objChannel.URL &""">" & objChannel.DisplayName & "</a>")
Else
' Call the sub procedure if the above conditions were not met. The nature of this recursive sub
' procedure means that each time the sub procedure calls itself, it "stacks" the information to be displayed
' until finally the the above condition is met; in this case until the channel's parent is the root channel. It
' then displays each "stacked" channels information as a trail behind the current channel.
BreadCrumb(objChannel.parent)
' Display the "stacked" channels as a link
response.write(" > ")
response.write("<a href = """& objChannel.URL &""">" & objChannel.DisplayName &"</a>")
End if
End if
End sub
' Setting the sub procedure into action; calling the sub procedure and passing in the current channel as a parameter
Call Breadcrumb(autosession.thischannel)
'EOF - SC - V1.0 Nov 2001
%>
Filen må meget gerne blive lavet om til c#.net
