Dealing with Quotations (") in HTML

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Dealing with Quotations (") in HTML

    Whenever I write a line of code that uses quotation marks, such as..

    <% foreach (merri.Data.dsMerri.AlbumDetailsRow dr in
    merri.Business.AllBusiness.ArtistAndAlbumByStyle(" Children")) {%>

    I recieve an error message if I try to view the designer. I have tried
    to comply with the message that says to surround the <%%> with ' quotes,
    but it doesn't help. What am I doing wrong?

    Jesse Guest

  2. Similar Questions and Discussions

    1. #40781 [NEW]: <input name="PHPSESSID" /> invalid HTML
      From: php dot net at steltenpower dot com Operating system: Linux PHP version: 4.4.5 PHP Bug Type: Session related Bug...
    2. Variable passing to script to fill html <img src="MyScript.Php?ImageName=KnownGoodData" >
      Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are...
    3. OT: Free content (random famous quotations)!
      Want a FREE random quote generator on your site? I'm offering one! Go to http://www.edcottrell.com/edblog/content_45.htm and follow the...
    4. Creating a "translate" function in ASP.NET, streaming in HTML from the web?
      I'm transitioning from ASP development, please excuse these basic questions. One thing I did often in ASP was create a "translate" function to...
    5. Nested Quotations in JavaScript Problem (Template)
      I'm using an if-then statement in my template parameter and seem to have screwed up the proper nesting of quotations or something. I get the...
  3. #2

    Default Re: Dealing with Quotations (") in HTML

    Okay, But I can't send HTML tags through functions from the code behind
    page if the tag includes ".
    I understand object-oriented, but the majority of examples that exist
    are not written in that fashion. Can you offer a code based solution for
    this?

    <% foreach (System.Data.DataRow drs in AlbumArray){
    merri.Data.dsMerri.AlbumRow newDr =
    (merri.Data.dsMerri.AlbumRow)drs; %>
    <td width="100">
    <A
    href="album.aspx?album=<%=newDr.Album_ID%>;&amp;st yle=<%=newDr.MusicStyle%>"

    <p id="albumlink"><%=newDr.Name%></p>
    </A>
    </td>
    <% } %>


    The "'s don't allow me to write the text in a function. So how do? I
    have been trying to follow the microsoft articles on web patterns, but
    no examples exist of this nature. I would really appreciate the help.

    Kevin Spencer wrote:
    > I would say that what you're doing wrong is treating object-oriented
    > technology like it's procedural. This isn't ASP; it's ASP.Net.
    >
    Jesse Guest

  4. #3

    Default Re: Dealing with Quotations (") in HTML

    By Wed, 23 Jul 2003 14:03:43 -0400, Jesse <spootwo@hotmail.com>
    decided to post
    "Re: Dealing with Quotations (") in HTML" to
    microsoft.public.dotnet.framework.aspnet:
    >Okay, But I can't send HTML tags through functions from the code behind
    >page if the tag includes ".
    >I understand object-oriented, but the majority of examples that exist
    >are not written in that fashion. Can you offer a code based solution for
    >this?
    >
    ><% foreach (System.Data.DataRow drs in AlbumArray){
    > merri.Data.dsMerri.AlbumRow newDr =
    >(merri.Data.dsMerri.AlbumRow)drs; %>
    > <td width="100">
    > <A
    >href="album.aspx?album=<%=newDr.Album_ID%>;&amp;s tyle=<%=newDr.MusicStyle%>"
    >
    > <p id="albumlink"><%=newDr.Name%></p>
    > </A>
    > </td>
    ><% } %>
    >
    >
    >The "'s don't allow me to write the text in a function. So how do? I
    >have been trying to follow the microsoft articles on web patterns, but
    >no examples exist of this nature. I would really appreciate the help.
    >
    >Kevin Spencer wrote:
    >> I would say that what you're doing wrong is treating object-oriented
    >> technology like it's procedural. This isn't ASP; it's ASP.Net.
    Did you try
    1. using single quotes in place of double quotes?
    2. escaping the double quotes: \"albumlink\"
    3. using hex values for literal characters? (there are some parsing
    classes in .net that will do the conversions for you)
    4. creating literal strings: @"myValue";
    or
    @"""myValue""";

    Surely one of these suggestions will work for you?

    HTH,

    /ts


    --

    exec rm -r /bin/laden*

    ##--------------------------------------------------##
    "We are stardust, we are golden,
    And we've got to get ourselves back to the Garden"
    Joni Mitchell
    ##--------------------------------------------------##
    /.. Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139