ASP.Net - ListView - Add a button which opens a popup window
You do this the same way that you do this using a GridView control.
First - add a button on the form. Notice the OnClientClick event
1 | <ItemTemplate> |
The thing is … we need 3 sets of quotes, but visual studio (and the compiler) can only deal with 2. To get around this we call a procedure - which generates the function.
On the code behind form add the CreateDatabaseLink.. function:
1 | Protected Function CreateDatabaseLink(ByVal Guid As String) As String |
When you view the source of the code generated you’ll see
… onclick=”openDatabase(‘c21bef0b-778d-4cf6-aaee-18fc3386fdb4’); return false;” l…
To finish this, you’ll need to add some javascript to the form. (the openDatabase function)
1 | <script> |