Jump to content

Reading In Bullet Points From Daily Updated Text File


Recommended Posts

I am new to ASP.Net but pretty good in VB.Net. I am trying to populate an ASP.Content page using a text file. I will be updating the textfile each week with new topics and I want the page load to automatically read the lines in the text file and load them into the content place holder <p> tags

Link to post
Share on other sites

Yes i can read the file but I'm uncertain as to how to apply it to the content. Here is the current hardcoded way I'm getting the topics in.

<asp:Content ID="Content1" ContentPlaceHolderID="TopContentLeft" Runat="Server"><h1 class="text1"style="font-size: x-large;    text-decoration: underline;    font-weight: bold;    color: #446908;">Did you know that?</h1><p class="text1"	   style="font-size: large;  line-height: 125%;  font-weight: bold;  color: #446908;">---  We recently completed an evaluation for a large Ocean Tug fleet showing 70% particulate reduction, 11% NOx reduction and an 8% fuel economy improvement.</p><p class="text1"  style="font-size: large;  line-height: 125%;  font-weight: bold;  color: #446908;">---  Our product was added to the Grainger catalog as its primary emissions and fuel efficiency Catalyst.</p>    <p class="text1"  style="font-size: large;	   line-height: 125%;  font-weight: bold;  color: #446908;">---  Our product is recommended by Mann-Hummel to promote better performance in Diesel Particulate Filters.</p></asp:Content>

Link to post
Share on other sites

I'm not sure of the specifics with ASP, but in general you'll need to parse the text into an array or some other structure, and loop through it to display each item. You may use a DataSet class, for example, or maybe just a simple loop.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...