Solved

Replace Statements - Double quotes

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now