开发者

How to modify HTML pages on load in c# asp.net

开发者 https://www.devze.com 2023-03-09 00:13 出处:网络
i have arround 40K HTML pages already created with same template look. in my application i call few of those html pages based on some conditions.

i have arround 40K HTML pages already created with same template look.

in my application i call few of those html pages based on some conditions.

i want to changed some part of thos HTML page (image and color) based on my condition and then display it in the browser.

for ex: if i am calling 1.HTMl 2 times then 1st time it should have orange background and 2nd time it should have yellow background.

i can not make changes in HTML files manully bcoz there are 40K HTML pages.

can any one help me solve this pro开发者_运维技巧blem?

Thanks in Advance


Make use of the Jquery in the HTML page and do change the CSS class based on the condition you choose...in $(document).ready() ..allows to achieve you task easily..


Your question isnt really specific enough to give you a whole answer. However.

  1. as HTML is only text, download the HTML within your app, either extract the bits you want, or, look for the bits you need to change, such as body colour, or CSS.. If its CSS, replace it with your own.

  2. Just because there are 40k files, doesnt mean you cant change them - if its accessible and feasible, then you can always do it. Even if you write a utility to do it for you. Such as.. inserting a comment section so you can easily extract sections from pages.

  3. If you have a specific question, show an example, your question and explain a little of what you tried. You will get better quality answers.


It sounds a design issue rather than a technical.

You should break down those 40 KB files into smaller parts using some of these technologies:

  1. Master Pages
  2. Server Controls
  3. Caching
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号