How can I take more control in ASP.NET?

前端 未结 7 628
感情败类
感情败类 2020-12-22 16:25

I\'m trying to build a very, very simple \"micro-webapp\" which I suspect will be of interest to a few Stack Overflow\'rs if I ever get it done. I\'m hosting it on my C# in

相关标签:
7条回答
  • 2020-12-22 17:09

    I've really been happy to totally abandon the page class altogether and just handler every request with a big switch case based on url. Evey "page" becomes a html template and a c# object. The template class uses a regex with a match delegate that compares against a key collection.

    benefits:

    1. It's really fast, even after a recompile, there is almost no lag (the page class must be big)
    2. control is really granular (great for SEO, and crafting the DOM to play well with JS)
    3. the presentation is separate from logic
    4. jQuery has total control of the html

    bummers:

    1. simple stuff takes a bit longer in that a single text box requires code in several places, but it does scale up really well
    2. it's always tempting to just do it with page view until i see a viewstate (urgh) then i snap back to reality.

    Jon, what are we doing on SO on a Saturday morning:) ?

    0 讨论(0)
提交回复
热议问题