|
Imports Microsoft.VisualBasic
Imports System.Web.HttpContext
Public Class Tools
Public Shared Sub BuildLookupValueReturnControl(ByVal e As GridViewRow, ByVal LinkControlId As String)
If e.RowType = DataControlRowType.DataRow Then
Dim hl As New HyperLink
Dim js As String
hl = CType(e.FindControl(LinkControlId), HyperLink)
js = BuildJS_ReturnLookupValue(Current.Request.QueryString("setLookupValueToControlID"), e.Cells(0).Text)
hl.NavigateUrl = "javascript://"
hl.Attributes.Add("onclick", js)
End If
End Sub
Public Shared Function BuildJS_ReturnLookupValue(ByVal controlID As String, ByVal valueToSet As String) As String
Dim s As String
s = "winOpener=window.self.opener;" & _
"winOpener.document.getElementById('" & controlID & "').value='" & valueToSet & "';" & _
"window.close();"
Return s
End Function
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.