单击Gridview的Linkbutton应打开一个要求文件上载的弹出窗口 [英] Clicking on Linkbutton of Gridview should open a pop asking for File Upload

查看:79
本文介绍了单击Gridview的Linkbutton应打开一个要求文件上载的弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,



我有Gridview,它是动态行生成器。在这个Gridview中,我在Column3中有一个Linkbutton =Upload,如果用户点击LinkBut​​ton,它应该打开一个新的弹出窗口,询问文件上传。是否可以在ASP.NET和VB.Net中进行。

Hello Experts,

I have Gridview which is dynamic row generator. In this Gridview I have a Linkbutton="Upload" in Column3, If user clicks on LinkButton, It should open a new pop up asking for File Upload. Is this possible doing in ASP.NET and VB.Net.

推荐答案

在链接按钮上单击,我执行了此代码,但窗口不在屏幕中心。但我认为这里有人可以帮助我。



On the linkbutton Click, I did this code, But the window is not in center of screen. But I think someone here can help me out in this.

Dim url As String = "Popup.aspx"
      Dim s As String = "window.open('" & url + "', 'popup_window', 'width=530, height=80, left='+((screen.width - 530) / 2)+', top=' + ((screen.heigth - 80) / 2));"
      ' Dim s As String = "window.open('" & url + "', 'popup_window', 'width=300,height=100,left=100,top=100,resizable=yes');"
      ClientScript.RegisterStartupScript(Me.GetType(), "script", s, True)





创建一个名为Popup.aspx的新webform并添加文件上传和Popup.ASPX中的一个按钮



这样我按照我想要的方式行事。但我是Dotnet的新手所以我不认为这是一个很好的做法,因为大多数用户阻止弹出窗口。我需要帮助。



Create a new webform with name Popup.aspx and add File upload and a button in Popup.ASPX

This way I did the way I wanted. But I am new to Dotnet so I don't think this is a good practice because most of the user block pop up windows. I need help in this.


这篇关于单击Gridview的Linkbutton应打开一个要求文件上载的弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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