I have a webform where a user enters data in some field and a datagrid is populated with the results of the query. The datagrid contains 6 bound columns with values from a database. There is one button column which contains a view link.
When the user clicks the view link I am running a separate procedure to encrypt a url string with values from the grid. I dont want to run the procedure until the user actually clicks the link.
I then am using response.redirect with the encrypted url to go to a new site
Below is the code that is working currently:
Sub LinkClicked(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
If e.CommandName = "View" Then
Dim buttonColumn As TableCell = e.Item.Cells(1)
Dim SSNColumn As TableCell = e.Item.Cells(10)
Dim SSN As String
SSN = SSNColumn.Text
URLtoFWd = " URLtoencrypt="userid=test&password=test1&key1=SSN|" & SSN
EncryptedURL = encrypt(urltoencrypt)
Response.Redirect(URLtoFWd + encryptedurl)
End IF
End Sub
I want to open the url above in a new window. I think I need to use javascript, but am not sure how I can pass it the variable URL.
Any help would be greatly appreciated
When the user clicks the view link I am running a separate procedure to encrypt a url string with values from the grid. I dont want to run the procedure until the user actually clicks the link.
I then am using response.redirect with the encrypted url to go to a new site
Below is the code that is working currently:
Sub LinkClicked(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
If e.CommandName = "View" Then
Dim buttonColumn As TableCell = e.Item.Cells(1)
Dim SSNColumn As TableCell = e.Item.Cells(10)
Dim SSN As String
SSN = SSNColumn.Text
URLtoFWd = " URLtoencrypt="userid=test&password=test1&key1=SSN|" & SSN
EncryptedURL = encrypt(urltoencrypt)
Response.Redirect(URLtoFWd + encryptedurl)
End IF
End Sub
I want to open the url above in a new window. I think I need to use javascript, but am not sure how I can pass it the variable URL.
Any help would be greatly appreciated