I have a datagrid with a button in a template column. I want the button to open a dialog box to prompt the user for a value. The value is then used in the aspx.vb (code behind) file.
To pop up the dialog box, I use the following:
Sub DataGrid1.ItemDataBound(...)
myButton.Attributes("onclick") = "javascript:return mypn = prompt('Enter a part number')"
End Sub
The error I get when I try to reference mypn in the aspx.vb file is "Public member 'mypn' on type 'object_aspx' not found". Is the variable mypn in the scope of the aspx file? The code behind file? Neither? Is there another way to accomplish this?
- John
To pop up the dialog box, I use the following:
Sub DataGrid1.ItemDataBound(...)
myButton.Attributes("onclick") = "javascript:return mypn = prompt('Enter a part number')"
End Sub
The error I get when I try to reference mypn in the aspx.vb file is "Public member 'mypn' on type 'object_aspx' not found". Is the variable mypn in the scope of the aspx file? The code behind file? Neither? Is there another way to accomplish this?
- John