I have the following code which defined my input field and my button:
<p>
<asp:TextBox ID="input" runat="server"></asp:TextBox>
<asp:Button ID="submit" runat="server" OnClick="submit_Click" Text="Button" />
</p>
<p>
<asp:GridView ID="searchDisplay" runat="server" OnSelectedIndexChanged="searchDisplay_SelectedIndexChanged">
</asp:GridView>
</p>
I added the a Click event to my Button once pressed it should invoke the following method:
protected void submit_Click(object sender, EventArgs e)
{
String keyword = input.Text; // Gets text inputed
List<T> = service.getTitles(keyword); // Two problems here
}
I have 2 problems i need to solve:
1) List should be defined as List<Publication> however type Publication is not part of this solution so i dont know how to correctly bind the data that WCF service returns to it. I tried E, T, and ? as parameters to List but all i get are errors.
Solved
2) I have a WCF service runing in another VS2012 instance how and in the first one i have it refrenced with keyword "service" why can’t i access it’s methods. I have a method in my WCF service that returns List<Publication> i tried writing List<?> data = service.getTitles(keyword); however this gives an error that the following is a type not valid in current context
you can try the following