Find/Replace Text in WebPage Asp.Net
I've created several .aspx templates t开发者_如何学运维hat are displayed in an IFrame depending on main page selections. In the templates there are 20 - 30 words to be replaced, each one is different. I did this as opposed to putting a bunch of labels in there. Can I somehow find and replace the words on the template page load?
I would place the content in a label or literal control, and then perform a string.replace. If you need more programmatic flexibility, you can use regex replacement, but you will get better performance from string.replace, even with very large strings. I can't find a cite, but that is my experience.
精彩评论