Script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • scriptDelms

    #1

    Script

    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: %>



  • Marina

    #2
    Re: Script

    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).

    "scriptDelm s" <anilvarmaen@ho tmail.com> wrote in message
    news:0bc101c361 c2$5f47b330$a00 1280a@phx.gbl.. .[color=blue]
    > 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: %>
    >
    >
    >[/color]


    Comment

    • ScriptDelm

      #3
      Re: Script

      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
      %>



      [color=blue]
      >-----Original Message-----
      >When you are calling a function, you put the parameters[/color]
      between ( and ).[color=blue]
      >You don't use square brackets.
      >
      >In general though, there are much better ways to[/color]
      accomplish what you are[color=blue]
      >doing. Such as placeholders, or databinding controls[/color]
      (depending on the[color=blue]
      >situation).
      >
      >"scriptDelms " <anilvarmaen@ho tmail.com> wrote in message
      >news:0bc101c36 1c2$5f47b330$a0 01280a@phx.gbl. ..[color=green]
      >> 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: %>
      >>
      >>
      >>[/color]
      >
      >
      >.
      >[/color]

      Comment

      • ScriptDelm

        #4
        Re: Script

        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
        %>



        [color=blue]
        >-----Original Message-----
        >When you are calling a function, you put the parameters[/color]
        between ( and ).[color=blue]
        >You don't use square brackets.
        >
        >In general though, there are much better ways to[/color]
        accomplish what you are[color=blue]
        >doing. Such as placeholders, or databinding controls[/color]
        (depending on the[color=blue]
        >situation).
        >
        >"scriptDelms " <anilvarmaen@ho tmail.com> wrote in message
        >news:0bc101c36 1c2$5f47b330$a0 01280a@phx.gbl. ..[color=green]
        >> 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: %>
        >>
        >>
        >>[/color]
        >
        >
        >.
        >[/color]

        Comment

        • Marina

          #5
          Re: Script

          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 " <anilvarmaen@ho tmail.com> wrote in message
          news:045201c361 c7$dd16a1e0$a10 1280a@phx.gbl.. .[color=blue]
          > 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
          > %>
          >
          >
          >
          >[color=green]
          > >-----Original Message-----
          > >When you are calling a function, you put the parameters[/color]
          > between ( and ).[color=green]
          > >You don't use square brackets.
          > >
          > >In general though, there are much better ways to[/color]
          > accomplish what you are[color=green]
          > >doing. Such as placeholders, or databinding controls[/color]
          > (depending on the[color=green]
          > >situation).
          > >
          > >"scriptDelms " <anilvarmaen@ho tmail.com> wrote in message
          > >news:0bc101c36 1c2$5f47b330$a0 01280a@phx.gbl. ..[color=darkred]
          > >> 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: %>
          > >>
          > >>
          > >>[/color]
          > >
          > >
          > >.
          > >[/color][/color]


          Comment

          • Carl Prothman [MVP]

            #6
            Re: Script

            "ScriptDelm " <anilvarmaen@ho tmail.com> wrote[color=blue]
            > Thanks for the info,..actually what i am trying to is i
            > have a ASP application[/color]

            Note this is the ASP.NET newsgroup. If you are using ASP,
            then please ask your questions in the ASP newsgroup.
            microsoft.publi c.inetserver.as p.general
            [color=blue]
            > 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 %>[/color]

            If UCase(Request.F orm("Add")) = "TRUE" Then

            --

            Thanks,
            Carl Prothman
            Microsoft ASP.NET MVP





            Comment

            Working...