如何处理按钮的单击和消失的元素 [英] how to handle button clicks and disappearing elements

查看:124
本文介绍了如何处理按钮的单击和消失的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

当前,我遇到的问题是,一旦单击按钮(我有一个处理Click-Event的子项),某些元素的内容就会被删除.为什么会这样,我该如何处理?
例如,我确实有一个File Uploader和一个Textfield.单击我的按钮后,就会发生这种情况.如果我选择一个文件并单击按钮,则不再选择该文件

Hallo,

currently I have the problem, that as soon as I click a button (I have a sub handling the Click-Event) contents of some elements are deleted. Why is that and how can I handle that?
I do for example have a File Uploader and a Textfield. This is what happens as soon as my button is clicked. If I select a file and click the button the file is no longer selected

Try
f_1.Text = btn_file.FileName.Replace(".pdf", "")
Catch ex As Exception

End Try

推荐答案

如果您的问题仅与文件上传有关,则以下内容可能会对您有所帮助.

http://stackoverflow.com/questions/2026087/maintain- value-in-fileupload-control-in-asp-net-c [如何在回发后保持FileUpload控件的状态 [ ^ ]
In case your issue is specific to file upload, following might help you.

http://stackoverflow.com/questions/2026087/maintain-value-in-fileupload-control-in-asp-net-c[^]

How to Maintain FileUpload Control’s State after PostBack[^]


这篇关于如何处理按钮的单击和消失的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆