venuchalla
Programmer
Hello,
I have added a database search funtionality to my webpage, it has a text box and search button, on the entry of some text in the textbox and click of the button, the results are displayed in the GridView .
Here I am having 3 tables in the database from which the search is performed , I have written the query like this
string strSQLQuery = "SELECT IssueNumber AS ID,SUBSTRING(Issues.Description,1,100) AS Description,'Issues' as TableName FROM Issues "
+ "WHERE Issues.Description LIKE '%" + TextBox1.Text + "%'"
+ "UNION "
+ "SELECT SID AS ID,SUBSTRING(ScheduledEvents.Information,1,100) AS Description,'ScheduledEvents' as TableName FROM ScheduledEvents "
+ "WHERE ScheduledEvents.Information LIKE '%" + TextBox1.Text + "%'"
+ "UNION "
+ "SELECT TID AS ID,SUBSTRING(TSGUpdate.Property,1,100) AS Description,'TSGUpdate' as TableName FROM TSGUpdate "
+ "WHERE TSGUpdate.Property LIKE '%" + TextBox1.Text + "%'";
Now I have added a new hyperlinkfield in the GridView,I want to show the details of the record selected in the gridview on click of this hyperlinkfield.
I am only able to get the results but I am not able to show the details ,
Can anyone of you please help me getting the details of the record selected on clicking the hyperlinkfiled.
I have added a database search funtionality to my webpage, it has a text box and search button, on the entry of some text in the textbox and click of the button, the results are displayed in the GridView .
Here I am having 3 tables in the database from which the search is performed , I have written the query like this
string strSQLQuery = "SELECT IssueNumber AS ID,SUBSTRING(Issues.Description,1,100) AS Description,'Issues' as TableName FROM Issues "
+ "WHERE Issues.Description LIKE '%" + TextBox1.Text + "%'"
+ "UNION "
+ "SELECT SID AS ID,SUBSTRING(ScheduledEvents.Information,1,100) AS Description,'ScheduledEvents' as TableName FROM ScheduledEvents "
+ "WHERE ScheduledEvents.Information LIKE '%" + TextBox1.Text + "%'"
+ "UNION "
+ "SELECT TID AS ID,SUBSTRING(TSGUpdate.Property,1,100) AS Description,'TSGUpdate' as TableName FROM TSGUpdate "
+ "WHERE TSGUpdate.Property LIKE '%" + TextBox1.Text + "%'";
Now I have added a new hyperlinkfield in the GridView,I want to show the details of the record selected in the gridview on click of this hyperlinkfield.
I am only able to get the results but I am not able to show the details ,
Can anyone of you please help me getting the details of the record selected on clicking the hyperlinkfiled.