Beginner Mistake

J

Jesse

I am trying to display a string located in my code behind page. I have
tried accessing the variable directly, and also as a Property. Every
time I recieve the following error:

CS0201: Only assignment, call, increment, decrement, and new object
expressions can be used as a statement

This is the html:

<td style="WIDTH: 703px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 28px"
width="703" background= "<%FirstTD;%>" >

And this is the code:

public string FirstTD
{
get
{
if(Request.QueryString["style"]=="children")
firstTD = "images/bg_kathy_template_r2_c2.gif";
else
firstTD = string.Empty;
return firstTD;
}
}


Any ideas. I know this is basic, but I would really appreciate any input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top