Everything looks fine except following few things-
1. Your stored procedure expects an
INT parameter where as you are passing
STRING as parameter.
2. If you haven't called it in the
Page_Load
or some appropriate event, it will not get loaded.
3. There is no point really to bind the gridview on
dgv_HSNMaster_CellClick
as it will never be called unless the grid is available to click.
4. I suspect, you want to call the bind grid on a button (search or something) click rather than grid cell click.
Suggestions:
1.
sqlda.SelectCommand.Parameters.AddWithValue("@HSNCode",int.parse(txt_HSNSearch.Text.Trim()));
2. Have a search button(or use if you already have it) and bind the gridview in the button click event.
Please let me know if my assumptions are not correct and your problem is something other than this.
Hope, it helps :)