Script

  • Thread starter Thread starter scriptDelms
  • Start date Start date
S

scriptDelms

hi,
below is the error i am getting, when i did a
Response.write in a ASPX HTML section. please let
me know on how to use the script tags in the
ASPX pages.



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

Line 15: <td>
Line 16: <%
Line 17:
Response.write["from aspx Page"];
Line 18: %>
 
When you are calling a function, you put the parameters between ( and ).
You don't use square brackets.

In general though, there are much better ways to accomplish what you are
doing. Such as placeholders, or databinding controls (depending on the
situation).
 
Thanks for the info,..actually what i am trying to is i
have a ASP application which has the the code as listed
below and i was trying to do a smiliar thing and i am
getting an error.... CS0117

<%if ucase(Request("Add"))="TRUE" then %>
<td><b>ADD a Record</b></td>
<%
End if
%>



-----Original Message-----
When you are calling a function, you put the parameters between ( and ).
You don't use square brackets.

In general though, there are much better ways to accomplish what you are
doing. Such as placeholders, or databinding controls (depending on the
situation).

scriptDelms said:
hi,
below is the error i am getting, when i did a
Response.write in a ASPX HTML section. please let
me know on how to use the script tags in the
ASPX pages.



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

Line 15: <td>
Line 16: <%
Line 17:
Response.write["from aspx Page"];
Line 18: %>


.
 
Thanks for the info,..actually what i am trying to is i
have a ASP application which has the the code as listed
below and i was trying to do a smiliar thing and i am
getting an error.... CS0117

<%if ucase(Request("Add"))="TRUE" then %>
<td><b>ADD a Record</b></td>
<%
End if
%>



-----Original Message-----
When you are calling a function, you put the parameters between ( and ).
You don't use square brackets.

In general though, there are much better ways to accomplish what you are
doing. Such as placeholders, or databinding controls (depending on the
situation).

scriptDelms said:
hi,
below is the error i am getting, when i did a
Response.write in a ASPX HTML section. please let
me know on how to use the script tags in the
ASPX pages.



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

Line 15: <td>
Line 16: <%
Line 17:
Response.write["from aspx Page"];
Line 18: %>


.
 
Use a datalist or datagrid to achieve the same thing. The need for server
scripts in asp.net is almost non existent. Try not to approach problems the
same way as you would in ASP. Learn the new functionality and components
available.

ScriptDelm said:
Thanks for the info,..actually what i am trying to is i
have a ASP application which has the the code as listed
below and i was trying to do a smiliar thing and i am
getting an error.... CS0117

<%if ucase(Request("Add"))="TRUE" then %>
<td><b>ADD a Record</b></td>
<%
End if
%>



-----Original Message-----
When you are calling a function, you put the parameters between ( and ).
You don't use square brackets.

In general though, there are much better ways to accomplish what you are
doing. Such as placeholders, or databinding controls (depending on the
situation).

scriptDelms said:
hi,
below is the error i am getting, when i did a
Response.write in a ASPX HTML section. please let
me know on how to use the script tags in the
ASPX pages.



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

Line 15: <td>
Line 16: <%
Line 17:
Response.write["from aspx Page"];
Line 18: %>


.
 
ScriptDelm said:
Thanks for the info,..actually what i am trying to is i
have a ASP application

Note this is the ASP.NET newsgroup. If you are using ASP,
then please ask your questions in the ASP newsgroup.
microsoft.public.inetserver.asp.general
which has the the code as listed
below and i was trying to do a smiliar thing and i am
getting an error.... CS0117

<%if ucase(Request("Add"))="TRUE" then %>

If UCase(Request.Form("Add")) = "TRUE" Then

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
Back
Top