Compiler Error Message CS1002; expected

Can anyone tell me why this is erroring out?

<title><b>User:</b><%Response.Write (Request.ServerVariables("LOGON_USER"))%></title>

0
art
6/11/2007 12:57:53 PM
asp.net.free-for-all 9281 articles. 0 followers. Follow

3 Replies
263 Views

Similar Articles

[PageSpeed] 33

 Add a semicolon at the end..

<%Response.Write (Request.ServerVariables("LOGON_USER"));%>

Alternativley you could write

<%= Request.ServerVariables("LOGON_USER") %> 

in which case a semicolon is not required.

 

amar 

0
amarsuperstar
6/11/2007 1:30:39 PM

Adding this code I get  Compiler Error Message: CS0118: 'System.Web.HttpRequest.ServerVariables' is a 'property' but is used like a 'method'

<title><b>User:</b><%Response.Write (Request.ServerVariables("LOGON_USER"));%></title>

I get the same CS0118 error if I use <%= Request.ServerVariables("LOGON_USER") %> 


 

0
art
6/11/2007 1:47:25 PM

If I modify the code and replace ( ) with [ ] it doesn't give me any errors, but it only returns the word "User:" in the IE title bar, any suggestions?

 <title>User:<%= Request.ServerVariables["LOGON_USER"] %></title>

0
art
6/11/2007 3:55:57 PM
Reply:

Similar Artilces:

Compiler Error Message: CS1002: ; expected
Hello, I keep getting the following error : 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: CS1002: ; expected Source Error: Line 220: cmd.ExecuteNonQuery(); Line 221: SqlCommand cmd = new SqlCommand("SELECT LASTUSED FROM MRISEQ WHERE UPPER(SEQID)='CASEID'", conn); Line 222: Dim lastused As OleDb...

Compiler Error Message: CS1002: ; expected
anybody can tell me what is the wrong for below line, i got error message Compiler Error Message: CS1002: ; expected SqlConnection myConnection = New SqlConnection(ConfigurationSettings.AppSettings["connectionString1"]); Thanks SABU Is that a direct copy and paste of your code? Because the "new" keyword needs to be all lowercase.Alister...

Compiler Error Message: CS1003: Syntax error, ':' expected
hent..." : "slett..."%>Hi, i have error in the belowed statement. It says " CS1003: Syntax error, ':' expected" If any body help me, It would be grateful.. Thanks in advance.   Compiler Error Message: CS1003: Syntax error, ':' expectedSource Error: Line 28: <td style="border:1;"><%# Eval("Person")%></td> Line 29: <td style="border:1;"><%# Eval("ass")%></td> Line 30: ...

Compiler Error Message: The compiler failed with error code1.
 Hi all, I just installed the software which was fine and no errors... when i went to run it first time at local host it came up with the following error... anyone know what this means?? I have created different ASP.NET projects and it runs no problem... Regards Sicose Server Error in '/PortalVBSDK' 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: The compiler failed...

Compiler Error Message: The compiler failed with error code 128.
 I have deployed my website to a server hosted by a hosting company. (WebHost4life). I keep getting an error message when I try to access the web application via the assigned URL. Does anyone know what the problem is? Why am I getting this error message and how do I fix it? 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: The compiler failed with error code 128...

Compiler Error Message: The compiler failed with error code 128
I recently installed the .net framework 1.1 to one of my IIS servers. I have been running the .net and some of the starter kits on my dev box and it works just great. In addition to trying the time tracking starter kit (which also works great on my dev box), I have tried a very simple test.aspx page. I would appreciate any help or direction on what to do about this. I am new to .net and not even sure what to try to resolve this problem Thanks in advance. -Bob Server Error in '/TTWebVBVS' Application. ----------------------------------------------------------------------...

Compiler Error Message: The compiler failed with error code -1073741502
Hi all, I am posting this just in case this information is useful for other people. I have an ASP.Net page created with VS2005 worked perfectly when running in release mode, but it consistently gave me the following error when running in debug mode within VS2005: Compiler Error Message: The compiler failed with error code -1073741502  The problem was solved after restarting VS.Hong Hi, I appreciate that you share your experience here. Thanks, ThomasThomas SunMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the post that helps you, and to click...

Compiler Error Message: CS1026: ) expected
Hi,I am new to ASP.Net. I developed a page using ASP.Net (C#). I got the follwing error, here it is along with the code. 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: CS1026: ) expectedSource Error: Line 54: </div> Line 55: </div> Line 56: <div class="ddot_app_right_area_tools_print"><asp:imagebutton id="PRINT" onclick="window.print();" Runa...

Compiler Error Message: CS1026: ) expected
I want to put a hyperlink with the following code, but it display the error--Compiler Error Message: CS1026: ) expected, PLEASE CAN ANYONE HELP ME?? <ItemTemplate> <asp:HyperLink runat="server" NavigateUrl='<%#"product.aspx?productID="DataBinder.Eval(Container, "DataItem.ProductID")%>' ID="Hyperlink1"> <%# DataBinder.Eval(Container, "DataItem.CategoryName") %> </asp:HyperLink> </ItemTemplate> and CODE BEHIND::: namespace Ecommerce { /// <summary> /// Summary description...

Compiler Error Message: CS1026: ) expected
I get this error message when I run a page: 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: CS1026: ) expected Source Error: Line 63: Line 64: objDataAdapter.Fill(objDataSet, "[Order]"); Line 65: DataView objDataView = new DataView(objDataSet.Tables"[Order]"); Line 66: Line 67: if (Page.IsPostBack) Source File: c:\inetpub\wwwro...

Compiler Error Message: BC30203: Identifier expected.
Hi all, Getting this error on line 12 of my source code, it's only a simple example and I think the code is right, but I can't figure out whats causing it. Compiler Error Message: BC30203: Identifier expected. Line 10: Dim objRdr As OleDbDataReader Line 11: Line 12: objConn = New OleDbConnection( _"Provider=Microsoft.Jet.OleDb.4.0;" & _"Data Source=C:\finalyearproject2\" & _"projectallocation.mdb") Line 13: objCmd = New OleDbCommand("SELECT * FROM project_descriptions", objConn) Line 14: objConn.Open() Her...

Compiler Error Message: BC30188: Declaration expected.
This is my code: When I run this I get the error "Compiler Error Message: BC30188: Declaration expected.". What is wrong ? The error points out to the statement >Line 7: Response.write ("HI") ' Insert page code here ' Response.write ("HI") Sub Page_OnLoad(sender As Object, e As EventArgs) response.write ("hi there" ) end Sub Function GetSomeDates() As System.Data.IDataReader Dim connectionString As String = "server='(local)'; trusted_connection=true; database='Orders'" Dim dbConnection...

Compiler Error Message: CS1026: ) expected #2
Hi I hope someone can help with a compiler error message as follows   <asp:HyperLink ID="HyperLink1" runat="server" Height="29px" NavigateUrl='<%# String.Format("Eval("Hyper")?Telecomitaccno={0}&BUSINESSSTREAM={1}&Dealer={2}", Eval("Telecomitaccno"), Eval("BusinessStream"), Eval("Dealer")) %>' The hyperlink is designed to evaluate a hyperling value from a table and then navigate to it carrying forward three items of information. The hyperlink works carrying the three pieces o...

.NET Compilation error message on only one client machine
This may be better in an IIS forum, but here goes. I have the dreaded ASP.NET error page with the following error:Compilation Error Message: BC30451: Name 'SqlHelper' is not declared.I'm using the Microsoft.ApplicationBlocks.Data helper methods.  I've compiled the application blocks DLL and then added a reference to the DLL in my website project.But heres the thing, my local machine (running my virtual machine) is my development site running IIS, and the site compiles fine and also runs fine.  Explorer displays the ASPX pages without any errors.  I've asked...

Web resources about - Compiler Error Message CS1002; expected - asp.net.free-for-all

Compiler - Wikipedia, the free encyclopedia
"Compile" and "compiling" redirect here. For the software company, see Compile (publisher) . For other uses, see Compilation . This article has ...

Compiler - Wikipedia, the free encyclopedia
... , or external linking . The most common reason for wanting to transform source code is to create an executable program. The name "compiler" ...

Facebook Open-Sources HipHop PHP Compiler Software
Earlier this morning, Facebook officially made their new PHP “compiler,” called HipHop, available as open source software. In the blog post by ...

Art in the Age of Matter Compilers
jurvetson posted a photo: Sheba may be the harbinger of art in the digital age — a mathematical sculptor with digital matter. She manipulates ...

Interpreters and Compilers (Bits and Bytes, Episode 6) - YouTube
This animation explains the difference between interpreters and compilers. It is from Episode 6 of the classic 1983 television series, Bits and ...

Typesafe cofounder forking Scala compiler
The main contributor to the Scala compiler, Paul Phillips, has announced on GitHub that he is forking the compiler to “fix some of the innumerable ...

Does Apple's new developer agreement ban Adobe's Flash-to-iPhone compiler?
Given that any kind of formal truce between Apple and Adobe was essentially blown out of the water by Steve Job's very public slating of Flash ...

Xcode 5.0 released with iOS 7 SDK, 64-bit app compiler
... has just pushed out Xcode 5.0 to the Mac App Store. The free app includes the SDKs for iOS 7 and Mountain Lion as well as the 64-bit app compiler: ...

NVIDIA and Continuum Analytics Announce NumbaPro, A Python CUDA Compiler
... are announcing that they are bringing Python support to CUDA. Specifically, Continuum Analytics’ will be introducing a new Python CUDA compiler, ...

Jack And Jill Are Google's New Compilers For Android App Developers
Android has gone through quite a few changes during its short 6 years of life. The Android that drives most of the world's smartphones of today ...

Resources last updated: 11/28/2015 6:35:37 PM