473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Quotes within Response.Write, Please help?

Hi ,

I am using Asp.net 1.1 using VB.NET and in the Page_Load() method I am
trying to use a Response.Write method as following but I keep getting
errors,

--------------------------
Response.Write("<td><a
href=""SecondPage.aspx?ID="+counter.ToString()+" "" " >Read</a></td>"
--------------------------

I am really stumped as to what could be the error. Please help. Any
help will be highly appreciated.

Thanks,
Erland

Jul 2 '06 #1
4 2072
Erland wrote:
Hi ,

I am using Asp.net 1.1 using VB.NET and in the Page_Load() method I am
trying to use a Response.Write method as following but I keep getting
errors,

--------------------------
Response.Write("<td><a
href=""SecondPage.aspx?ID="+counter.ToString()+" "" " >Read</a></td>"
--------------------------

I am really stumped as to what could be the error. Please help. Any
help will be highly appreciated.

Thanks,
Erland
Try:
Response.Write("<td><ahref=""SecondPage.aspx?ID=" &
counter.ToString() & """ >Read</a></td>")

Jul 3 '06 #2

hello Erland

this sould work

Response.Write ( "<td><a href='SecondPage.aspx?ID='" + counter.ToString
( ) + "'>Read</a></td>"

you can't use quotes within quotes, as that breaks the statement. use
single quotes instead :)

Jul 3 '06 #3
Hi ,
>
I am using Asp.net 1.1 using VB.NET and in the Page_Load() method I am
trying to use a Response.Write method as following but I keep getting
errors,

--------------------------
Response.Write("<td><a
href=""SecondPage.aspx?ID="+counter.ToString()+" "" " >Read</a></td>"
--------------------------

I am really stumped as to what could be the error. Please help. Any
help will be highly appreciated.

Thanks,
Erland
For C#, use \" to represent a literal quote:
Response.Write("<td><a href=\"SecondPage.aspx?ID="+counter.ToString()+
"\">Read</a></td>");

Hans Kesting
Jul 3 '06 #4
Hi,

Its fixed. Thank you every one.

Thanks,
Erland
Hans Kesting wrote:
Hi ,

I am using Asp.net 1.1 using VB.NET and in the Page_Load() method I am
trying to use a Response.Write method as following but I keep getting
errors,

--------------------------
Response.Write("<td><a
href=""SecondPage.aspx?ID="+counter.ToString()+" "" " >Read</a></td>"
--------------------------

I am really stumped as to what could be the error. Please help. Any
help will be highly appreciated.

Thanks,
Erland

For C#, use \" to represent a literal quote:
Response.Write("<td><a href=\"SecondPage.aspx?ID="+counter.ToString()+
"\">Read</a></td>");

Hans Kesting
Jul 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Cyrus D. | last post by:
Hi guys, I haven't done that much research on this topic but it seems I can use either the single quotes or the double quotes. SInce I am so used to C(++) I prefer the double quotes and am...
1
by: Thomas Henz | last post by:
Hi there, I want to do: response.write("bla bla bla "in quotes" bla bla") How do I show the quotes on the screen in asp like I have to do \" in php? Thanks,
3
by: addi | last post by:
All, I will be eternally greatful if someone can provide snippet of code, URL or reference material that shows how to display data in a "n colums * n rows" format. I am new to ASP and have...
2
by: Jon Maz | last post by:
Hi, I have written a page to test a function of mine that strips non-English accents and various other characters out of a given string. The function itself (called 'StripAll' in the code below)...
1
by: scott | last post by:
Can someone help me my quotes in LISTING 2 below? LISTING 1 works fine in HTML, but I'm having trouble with quotes in LISTING 2 near the javascript code when trying to response write the entire...
4
by: scott | last post by:
Can someone help me with quote syntax? The single quotes with javascript function are messing me up. CODE --------- response.write ""<a href=""javascript: VerifyDelete1('del-message.asp?fid="...
6
by: scott | last post by:
Below in GOOD CODE, I have a mix of ASP/HTML that works. I'm trying to convert the code into all ASP, but I'm failing in BAD CODE. Can someone help me with these quotes? The single quotes are very...
5
by: andy.z | last post by:
I'm writing a PHP line to the foot of a file using another language. my problem is I'm not sure how to write it so that the quotes (both single and double) are corret for PHP to process. The...
5
by: Hels Bells | last post by:
Hi, I'm looking to do some manipulation on a string containing html code in asp which will involve me either using some regular expressions or just plain old simple replace functionality. The...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.