I have the following TextBox and Button:
<asp:TextBox ID="input" runat="server" Height="10px" Width="60px">123456</asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="ViewButton_Click" Text="Button" />
The TextBox has a default value of '123456'. Clicking the botton should then trigger the following:
public byte[] GetImageData(int ID)
{
....
SqlCommand command = new SqlCommand("select FileImage from TestServ.dbo.Tickets WHERE (FileType = 'PDF' AND ID = 111111)", connection);
....
}
Currently, the ID is manually set to '111111', which will be used to grab a PDF from a server corresponding to the ID entered. What I'm having trouble doing however is modifying the code so that it grabs the ID I enter into the 'input' TextBox (currently 123456) and then sets it as the ID in the above code rather than '111111'.