开发者

Rendering "partial" pages in ASP.Net? (without the <html> and such)

开发者 https://www.devze.com 2022-12-26 07:45 出处:网络
I am trying to开发者_如何学C make use of jQueryUI AJAX tabs in my ASP.Net Webforms project. I have come up against a wall though. For AJAX, you must render only a partial page(no <html> and su

I am trying to开发者_如何学C make use of jQueryUI AJAX tabs in my ASP.Net Webforms project.

I have come up against a wall though. For AJAX, you must render only a partial page(no <html> and such elements) by an external URL. How would you best do this in ASP.Net? aspx files require things like a <html> and <head> tag so those wouldn't work so the only thing that comes to mind is using cumbersome ashx files. Am I just over thinking this? Is there an easier way?

Edit: So apparently <html> and such tags are not actually required. So what differences are there to rendering without the full page headers? Will some controls not work? Why wouldn't they?


There's no reason your .aspx pages have to have <html> tags.

Just go ahead and build .aspx pages with the content you want on them and point your jQuery UI tabs to each URL and it will wire up nicely.


ASP.Net does not require any particular HTML tags.
You can make a partial page as an ASPX that includes whatever you want. (Although some server-side controls might not work)

In fact, you can even make an ASPX page that renders aribtrary (non-XML) plain text.

0

精彩评论

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