Solved

Replace Statements - Double quotes

Posted on 2006-06-21
2
219 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
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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