css for a content page is converting to "QuirkMode" in asp.net
hey guys, i have a page "shopingcart.aspx" in one of the contentplaceholder of master page, now when i load this page css is render just fine, but when i go to this page by postback e.g "开发者_运维知识库shopingcart.aspx?itemid=1" then the css is rendering like quirkmode. All the content of the table are showin' bigger, any one out there faced this kind a problem ? any idea guys please help me out here..
Replace Response.write()
whereever you are using it with Page.ClientScript.RegisterStartupScript(Page.GetType(), "alert", "your script")
.
Response.Write
has no place in web forms based ASP.NET. Anything that you response.write
will get injected in the response before the rest of the page. Look at View Source on the rendered page and you will see that your <script>
tag appears before the <html>
tag (which should be the first one).
精彩评论