开发者

Html rendered under asp:updatepanel does not appear in page source

开发者 https://www.devze.com 2022-12-23 10:05 出处:网络
I am working 开发者_如何学Gowith .net c#. Is there a way to see the rendered html code under the updatepanel?

I am working 开发者_如何学Gowith .net c#. Is there a way to see the rendered html code under the updatepanel? Thanks

more info: I dynamically generate UI controls and place them in a asp:Panel control I have under updatePanel. My page is initially almost empty, and I add about 50 new controls upon button click. However, I cannot see the html code generated in the page source. as in, I can see my textfield on the screen but I cannot see the corresponding code in the html source on my browser. Thanks again.


What are you using to view the source? If you are using the View Source functionality in some browsers, this may only be showing you the initial server response, and anything dynamically inserted into the page in an AJAX call might not appear.

If you use a tool like Firebug you can watch the current state of the DOM, which will show you any dynamically inserted elements.


With Internet Explorer you can use the Developer Tools (IE8) to view the actual source, not just the initial source. As Tom said Firebug will do the same thing in Firefox, and Safari has a similar option that I can't remember off hand what it's called.


Basically, you need to inspect the DOM instead of the html source. Addins like Firebug for firefox and Developer Tools for IE8 would allow you to inspect the DOM and even allow you to update them dynamically.

If you need to view HTML instead of the DOM representation, you can use Fiddler or Firebug's NET Panel, which will let you debug HTTP traffic and see the response given for the AJAX calls.


It does appear over here, just like normal ASP.net controls, just there is a little bit of ajax code that does the updating. Can you be more specific about what are you looking for?

0

精彩评论

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