views:

316

answers:

1

Hello,

I'm doing a jQuery AJAX request to get an aspx page in my project and inserting it into a table. The aspx page contains a single table row (as in, it starts with tr and ends with /tr). Because of this, I cannot add anything before or after those tr's.

My problem is the following: If I try to type in < asp: into Visual Studio 2005, intellisense doesn't recognize any of the pre-defined asp controls (eg: asp:PlaceHolder). If I add the html and body tags to the top and bottom of the page the asp intellisense works, but now inserting the row into the table breaks it one way or another (it seems to be treated as a separate page within the table itself).

Is there a way to fix this or a better way of adding dynamic asp content into a table using AJAX? I tried using a custom control but AJAX can't refer to that directly, and I tried setting the aspx page under a blank master page file but that breaks it too (not exactly sure what it's doing, but the table row doesn't appear at all after the ajax request). Any other suggestions?

Bara

A: 

you don't add asp content, you add html content;

the asp: tags are being rendered as html content

usually you make something like this:

<div id="mydiv"></div>

and in the javascript you call a web or wcf service through ajax and change the inner html of "mydiv"

Omu
Yes, that would work usually. However, this time I'm adding a row to a table, not a div. Also, the row I'm adding has dynamic content, so static html won't do.
Bara