Hi there,
I have been looking everywhere, but cannot find the precise solution to my question.
All I want to do is to see whether the value i enter in my textbox actually exists in the C# DataList when I hit my "find" button. If the value exists, I want it to go to a certain page; if not, I want it to do something else.
Can someone please help me?
On the aspx page:
Note: My textbox’s name is “txtitemtofind” and my button’s name is “btnfind”
<asp:TextBox ID="txtitemtofind" runat="server"></asp:TextBox>
<br />
<asp:Button ID="btnfind" runat="server" Text="Find" onclick="btnfind_Click" />
<br />
<asp:Label ID="lblfinder" runat="server" Text=""></asp:Label>
<br />
<asp:DataList ID="dlnames" runat="server">
<ItemTemplate>
<asp:Label ID="lblauthornames" runat="server" Text='<%#Eval("[Skrywer name]") %>'></asp:Label>
</ItemTemplate>
</asp:DataList>