Solved

Use Javascript to create resizable window

Posted on 2014-03-20
2
264 Views
Last Modified: 2014-03-21
How can I make this code open a resizable window?
    Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
        Try
            If e.Row.RowType = DataControlRowType.DataRow Then


                Dim lnk As LinkButton = DirectCast(e.Row.FindControl("lnk_productid"), LinkButton)

                Dim url As String = SuppliedFileChangeURL & "?SuppliedFileID=" + lnk.Text

                'lnk.Attributes.Add("onClick", (Convert.ToString("JavaScript: window.open('") & url) + "','','_blank','width=5000,height=200,left=350,top=400,resizable=yes')")
                lnk.Attributes.Add("onClick", (Convert.ToString("JavaScript: window.open('") & url) + "','','_blank','width=5000,height=200,left=350,top=400,resizable=1')")
            End If
        Catch generatedExceptionName As Exception
        End Try
    End Sub

Open in new window

0
Comment
Question by:AlHal2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
ID: 39944547
Not knowing .Net much, what is with the convert to string?
If it is in quotes it should already BE a string.
Also there is no need for the javascript:
Lastly you have too many quotes

I would imagine

lnk.Attributes.Add("onClick","window.open('" & url &"','_blank','width=5000,height=200,left=350,top=400,resizable')") 

Open in new window

0
 

Author Closing Comment

by:AlHal2
ID: 39945027
thanks
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question