473,569 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

For a complete ASP.NET Beginner...

1 New Member
Hi guys,

I've been thrown in the shallow end of this so forgive me for my ignorance with this post. I'm a PHP developer but the contract I am currently working on has some websites that were built using ASP.NET. The problem is simple: I need to check for the id of a page and display a different meta description based on what page it is on.

But I'm not sure what the process is with ASP... do I need to compile after making any changes? For example the following code:

<%
Request.QuerySt ring["Category"];
%>

Generates are compilation error:
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: CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement

Source Error:

Line 10: <!-- InstanceBeginEd itable name="SEO Meta" -->
Line 11: <%
Line 12: Request.QuerySt ring["Category"];
Line 13: %>
Line 14: <meta name="Descripti on" content="" />


Source File: e:\inetpub\esvc 001096\Catalogu e.aspx Line: 12


I know, I know... I should spend some time learning it, but they've sprung it on me this morning (the asp programmer is away), it needs to be done yesterday.... and I never thought I would ever be required to program in ASP!

Thanks for your help.
Jun 18 '07 #1
2 1200
improvcornartist
303 Recognized Expert Contributor
Use parentheses, not brackets :
<%category = Request.QuerySt ring("Category" )%>
Jun 18 '07 #2
jhardman
3,406 Recognized Expert Specialist
But I'm not sure what the process is with ASP... do I need to compile after making any changes? For example the following code:
.
classic asp was a lot like php, but then microsoft decided to combine it with its .net package. As I understand it the file is compiled automatically the first time it is run (no need for you to run a compile) so that on subsequent runs it takes less server time

Jared
Jun 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2366
by: Grrrbau | last post by:
I'm a beginner. I'm looking for a good C++ book. Someone told me about Lafore's "Object-Oriented Programming in C++". What do you think? Grrrbau
7
2916
by: Rensjuh | last post by:
Hello, does someone have / know a good C++ tutorial for beginnners? I would prefer Dutch, but English is also fine. Hoi, heeft / kent iemand nog een goede C++ tutorial voor beginners? Het liefste in Nederlands, maar Engels is ook goed. Thnx, Rensjuh
9
10814
by: UnixUser | last post by:
I am looking for some source code to run on Linux that will enable me to calculate and return a CRC32 value from a string of text. I have found one from snippets.org, but I cannot get it to compile. Please help me find something that is simple to install, includes all header and language files and that will compile.
27
4351
by: MHoffman | last post by:
I am just learning to program, and hoping someone can help me with the following: for a simple calculator, a string is entered into a text box ... how do I prevent the user from entering a text instead of a number, or give an error message? Also, how can I make the program verify there are two valid entries in txtBox1 and txtBox2 to then...
18
2904
by: mitchellpal | last post by:
Hi guys, am learning c as a beginner language and am finding it rough especially with pointers and data files. What do you think, am i being too pessimistic or thats how it happens for a beginner? Are there better languages than c for a beginner? For instance visual basic or i should just keep the confidence of improving?
5
1821
by: steve young | last post by:
Hi, a complete idiot would like some help with the following: I have 17 command buttons, which I would like to assign 17 text boxes to. The boxes are to be hidden, until the appropriate button is pressed. When the text box appears, I need to be able to add data to it, and then save it somewhere for future reference. I have tried using the combo...
3
1263
by: jyck91 | last post by:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> main() { float num; int i, temp, remainder, baseM, j; printf("Enter a number:"); scanf("%f",&num);
2
1513
by: cob98tp | last post by:
Hi all I a complete beginner when it come to using HTML code so please help me out! All I want to do is create a link in my document that will add my page to the browers' favorites list. What I have created is a Roll-Over image in Dreamweaver 8, which is placed is a layout table. I know that the code to put the page into the favorites folder is...
0
1412
by: Alex | last post by:
Hi, I am a complete beginner with Oracle 9i and XML within it, not XML alone though. I am trying to do a regular SELECT statement using the SQL Scratchpad within the Oracle Enterprise Manager and am trying to have it return XML rather than the usual rows of data. Someone told me to try this: SELECT SYS_XMLGEN (BRN_LAST_NAME) FROM ...
22
18119
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php programmer and looking for a starting point in regards to practical projects to work on. What are some projects that beginner programmers usually...
0
7695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.