Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6085711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:40:11+00:00 2026-05-23T11:40:11+00:00

I need to write some html tags into a txt file that has javascript

  • 0

I need to write some html tags into a txt file that has javascript in it as well. Can I just replace the html tag after creating the fresh tag? (if yes, how do I replace existing or old tag with new tag.). Or just recreate the whole content within that text file.

I am using VS 2010, c#, it’s a console app that I will have scheduler run 5am everyday.

So, I have 2 tags (parent div and child div). Basically I need to replace the child div. Here is the link of the txt file. I am talking about child div “slide” . This is what I need to recreate every day.

<div class="slides_container">
   <div class="slide">
    <a href="http://www.flickr.com/photos/jliba/4665625073/" title="145.365 - Happy Bokeh Thursday! | Flickr - Photo Sharing!" target="_blank"><img src="img/slide-1.jpg" width="570" height="270" alt="Slide 1"></a>
     <div class="caption" style="bottom:0">
        <p>Happy Bokeh Thursday!</p>
     </div>
   </div>
   <div class="slide">
    <a href="http://www.flickr.com/photos/stephangeyer/3020487807/" title="Taxi | Flickr - Photo Sharing!" target="_blank"><img src="img/slide-2.jpg" width="570" height="270" alt="Slide 2"></a>
     <div class="caption">
       <p>Taxi</p>
     </div>
    </div>

Thanks
Mike

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:40:12+00:00Added an answer on May 23, 2026 at 11:40 am

    I would recommend you using a HTML Parser to manipulate HTML. Html Agility Pack is great for this job.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

1: I have a .html file that has some markup with some placeholder tags.
Hallo, i need to write some javascript that gets the contents of a userfield
I need to write some client-side javascript for a webpage that will truncate the
I need to write a function that takes some HTML, strips out the img
I need to write some code that will search and replace whole words in
I need to read a HTML file and search for some tags in it.
I need to write some code that performs an HTML highlight on specific keywords
I have a html file has the general design (some div's) and I need
I need to write some javascript to strip the hostname:port part from a url,
I need to write some sql that will allow me to query all objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.