I have a GridView with a few labels and two DropDownList controls. At the end of each row, I have a "Print" button (normal form button, not asp button). The onclick event produces javascript and passes in values from the grid.
How do I get the Dropdownlist values?
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<input type="button"
style="font-size: 18px"
onclick="javascript:jsWebClientPrint.print('useDefaultPrinter=' + $('#useDefaultPrinter').attr('checked') + '&printerName=' + $('#installedPrinterName').val() + '&lblNDC=<%# Eval("CODE1") %> ' + '&unit=<%# Eval("ddUnit.Text") %> ');"
value="Print" />
</ItemTemplate>
</asp:TemplateField>
It doesn't like trying to Eval ddUnit.Text, but that's the value I'm trying to pass as a URL variable.