ASP.NET 1.0 and 1.1 BasicsASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I know there is an example in the ASP.NET 1.1 ... Wrox book about checking whether the user has alread registered for updates. I implimented the example in the book, but it didnt seem to work so well. There must be another way of doing it without using cookies.
I just want the code to check if the user is alread in the database. I am using c#. I should think i need to use an IF statment, but how?
You can't put a control property in a literal string like that. .NET doesn't implicitly figure out that you are referring to an object. You need to concatenate the value like this:
strCommand = "SELECT [Addressbook].[email] FROM [Addressbook] WHERE [Addressbook].[email] = '" & txtFrom.Text & "'";