|
Partial Class Controls_Lookup
Inherits System.Web.UI.UserControl
Public Property Height() As String
Get
Return Me.ViewState("Height")
End Get
Set(ByVal value As String)
Me.ViewState("Height") = value
End Set
End Property
Public Property Width() As String
Get
Return Me.ViewState("Width")
End Get
Set(ByVal value As String)
Me.ViewState("Width") = value
End Set
End Property
Public Property Url() As String
Get
Return Me.ViewState("Url")
End Get
Set(ByVal value As String)
Me.ViewState("Url") = value
End Set
End Property
Public Property LookupWindowName() As String
Get
Return Me.ViewState("LookupWindowName")
End Get
Set(ByVal value As String)
Me.ViewState("LookupWindowName") = value
End Set
End Property
Public Property ReturnToControlID() As String
Get
Return Me.ViewState("ReturnToControlID")
End Get
Set(ByVal value As String)
Me.ViewState("ReturnToControlID") = value
End Set
End Property
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sJS As String
sJS = "javascript:w=window.open(" & _
"""" & ResolveClientUrl(Me.Url) & "?setLookupValueToControlID=" & Me.Parent.FindControl(Me.ReturnToControlID).ClientID & """," & _
"""" & Me.LookupWindowName & """," & _
"""" & "location=0,status=0,scrollbars=yes,resizable=yes," & _
"width=" & Me.Width & ",height=" & Me.Height & """" & _
");w.focus();"
Me.Lookup.NavigateUrl = "javascript://"
Me.Lookup.Attributes.Add("onclick", sJS)
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.