ScriptManager上的文件上传.RegisterClientScriptBlock单击确定 [英] File upload on ScriptManager.RegisterClientScriptBlock Clicks ok

查看:79
本文介绍了ScriptManager上的文件上传.RegisterClientScriptBlock单击确定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,



首先,对于那些一直在帮助开发人员的人。祝贺今年这么好,我感谢你们每一个人。祝大家新年快乐。



现在,我有一个网页,它为网格生成动态行,而Grid有Dropdown。在下拉列表中选择索引已更改=文件然后我​​使用Scriptmanager.RegisterClientScriptBlock显示Pop。当他们点击确定时应该有一个警告要求用户上传文件。我现在正在战斗,我不知道如何继续进行。



警告点击确定会弹出文件上传。



请帮帮我。



Gridview.ddl.selectedvalue =文件然后弹出一条消息提交一个文件Ok取消



如果(好)

上传文件弹出

else if(Cancel)

DDL默认设置为Grid

Hello Experts,

Firstly for all those you have been helping developers. Congratulations on being so good this year and I Thank each one of you. Wish you all a Happy New Year.

Now, I have web page where it generates dynamic rows for a Grid, and Grid has Dropdown. On dropdown selected index changed="File" Then I am showing a Pop using Scriptmanager.RegisterClientScriptBlock. When they Click "OK" There should be an alert asking user to upload a file. I am fighting at this point, I do not know how to proceed further.

On alert click "OK" should pop up for file upload.

Please help me out in this.

Gridview.ddl.selectedvalue="File" Then pop up a message "Submit a file" Ok Cancel

If (Ok)
Upload File pop up
else if (Cancel)
DDL set to default in Grid

推荐答案

据我所知,问题正在发生,因为按钮确定和取消不是最初出现在标记上,但它们是在打开弹出窗口时创建的。



如果我是对的,那么你可以做一件事。使用您显示的控件以及ok和cancel按钮声明标记中的面板。使它们成为服务器按钮并定义它们的服务器端单击事件。使面板的可见性为false。现在,当选择DropDownList时,您可以从服务器端显示面板,该面板最初是隐藏的,并且显示它也是一个弹出窗口。搜索示例,你会得到它。



现在,你已经确定并取消按钮点击服务器端事件。因此,在这些事件中,再次显示一个带有文件上传控件的面板(已在aspx页面上声明)。



这可能是一项艰巨的任务,但是你可以做到。
As far as I can guess, the problems is happening because the buttons ok and cancel are not initially present on the markup, but they are created when popup is opened.

If I am right, then you can do one thing. Declare a panel in markup with the controls you are showing along with the ok and cancel buttons. Make them server buttons and define their server side click events as well. Make the visibility of the panel to false. Now, when DropDownList is selected, you can show the panel from server side, which is hid initially and show it is a popup too. Search for examples, you will get it.

Now, you have ok and cancel button clicks server side events. So, inside those events, again show one panel with the file upload control (which is already declared on aspx page).

It can be a difficult task, but you can do it.


这篇关于ScriptManager上的文件上传.RegisterClientScriptBlock单击确定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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