开发者

After click button the page content are gone (invisible)

开发者 https://www.devze.com 2023-01-12 06:19 出处:网络
I\'ve a page and I\'ve postpack control in my cs file. For example in post.aspx page users can comment.

I've a page and I've postpack control in my cs file. For example in post.aspx page users can comment. They give name, email, url and 开发者_运维问答comment and then click send button. After click send button page content are gone. Why is this happened?

Again I have a postback control in page_load like

if(!page.ispostback)


Probably you're creating dynamic controls (programmatically appended to the page) and you don't recreate them on postback.

More details about what you're doing would help though.


As Claudio Redi mentions, you're properly setting the content of the label and the div, inside

if (!Page.IsPostBack)

This means, that the code will not be run, if a button is clicked. This will only run, the first time you're visiting the website.

0

精彩评论

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