Problem with quotation mark in dynamically created url

I have a line of code that dynamically creates a url. See below:

<a href="request_add.asp?id=<%Response.Write rs3("m_id")%>&requestor=<%Response.Write rs3("m_requestor")%>&quantity=<%Response.Write rs3("m_qty")%>&jobno=<%Response.Write rs3("m_jobno")%>&material=<%Response.Write rs3("m_material")%>">

Open in new window

Problem is "m_material" (the last one) occasionally has a quotation mark in it which makes the url prematurely end.

Any ideas to help me solve this problem.
Robert FrancisDirector of Continuous ImprovementAsked:
Who is Participating?
Big MontySenior Web Developer / CEO of Commented:
Not sure where that extra and came from, should be

<%Response.Write Server.HTMLEncode(w  rs3("m_material")) %>
Big MontySenior Web Developer / CEO of Commented:
Try this

<%Response.Write Server.HTMLEncode(and  rs3("m_material")) %>
Robert FrancisDirector of Continuous ImprovementAuthor Commented:
Just noticed that. Worked great. You are the man once again Big Monty!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.