Click here to Skip to main content
15,895,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

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.

VB
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)


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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900