Solved

Replace Statements - Double quotes

Posted on 2006-06-21
2
221 Views
Last Modified: 2012-05-05
Hey, I'm sure the answer to this is somewhere already, but my account was just suspended (haven't answered any in a while) so I can see solutions.  But I still have points to give away!  I'm wondering what the easiest way to replace two html lines of buttons are.  I'm scraping a web page (my own) to send in an email and I want everything but the buttons to go along.  But with all the double quotes and stuff in the html, a simple replace doesn't work.  How should I do this?

What doesn't work:

strOutput = Replace(strOutput, "<input type="submit" name="btnPrint" value="Print" id="btnPrint" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" />", "")
       
strOutput = Replace(strOutput, "<input type="submit" name="btnCancel" value="Cancel" id="btnCancel" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" />", "")


Thanks in advance for your help!    
0
Comment
Question by:brianpsmith81
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 125 total points
ID: 16954371
You use two quotes together (""):

    strOutput = Replace(strOutput, "<input type=""submit"" name=""btnPrint"" value=""Print"" id=""btnPrint"" class=""btn"" onmouseover=""this.className='btn btnhov'"" onmouseout=""this.className='btn'"" />", "")
0
 
LVL 3

Author Comment

by:brianpsmith81
ID: 16954776
Oh yeah, I should've known that!  Thanks! :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question