Here is a snippet from my page.asp file. <TD><% If rstDBEdit.Fields("Title").Value = "NEWS" Then Response.Buffer = True Dim objXMLHTTP, xml url = rstDBEdit.Fields("Body").Value What I want to do is change the Value = "NEWS" to Value = "WORLD NEWS" or "LOCAL NEWS" or "SPORTS NEWS" The reason I need to do this is because the way the code is currently written, I have to name all my newly created pages "NEWS". This becomes very confusing when adding 10-20 new pages. All thoughts are welcomed!
that should be either tempTitle = rstDBEdit.Fields("Title").Value = "NEWS" if tempTitle = "WORLD NEWS" or tempTitle = "LOCAL NEWS" or tempTitle = "SPORTS NEWS" then <your code here> end if Code (asp): or select case rstDBEdit.Fields("Title").Value = "NEWS" case "WORLD NEWS" , "LOCAL NEWS" , "SPORTS NEWS" <your code here> end select Code (asp): you could also just check if it ends in "NEWS" (but make sure that no titles end in NEWS if you do not want the to be parsed by this code.. if right(rstDBEdit.Fields("Title").Value, 4) = "NEWS" then <your code here> end if Code (asp): take care
I tried the first and second scenarios however neither seemed to work for me. Any other suggestions???
I am sorry, i made a mistake in the copy/paste of your code ( i did not remove the final = "NEWS" part ) they should be: tempTitle = rstDBEdit.Fields("Title").Value if tempTitle = "WORLD NEWS" or tempTitle = "LOCAL NEWS" or tempTitle = "SPORTS NEWS" then <your code here> end if Code (asp): or select case rstDBEdit.Fields("Title").Value case "WORLD NEWS" , "LOCAL NEWS" , "SPORTS NEWS" <your code here> end select Code (asp):
All right then... Let's try this. The pages that I am adding are newly created rss news feeds. Currently these pages are set up independently, meaning each rss feed has it's own dedicated page. Is there a way to add a news feed to a portion of a page that has other content on it such as the home page?
Can't see why not, logically you should be able to use the same code you use on your independent pages.. ( my understanding is that you read a feed and display its contents.. right ? )
Your understanding is correct! I will mess around with that code and see what I can come up with. Thanks again.