Hello! I'm currently doing a registration form in asp.net with 3 layered development. I want to know what are the codes for search button. I want it to display results in the data grid view when i input the primary key. Thank you :)

Member Avatar
LastMitch

Hello! I'm currently doing a registration form in asp.net with 3 layered development. I want to know what are the codes for search button. I want it to display results in the data grid view when i input the primary key. Thank you :)

It's a bit more code involved.

So it's better you can read these links regarding about asp.net with 3 layered development and look at the code and modify the code to suited to your own code:

http://www.codeproject.com/Articles/36847/Three-Layer-Architecture-in-C-NET

http://www.dotnetfunda.com/articles/article71.aspx

http://peterkellner.net/2006/01/09/microsoft-aspnet-20-memberrole-management-with-iis/

http://www.asp.net/web-forms/tutorials/data-access/introduction/creating-a-data-access-layer-cs

Easy ... add a text box and button. On button click, take the text box entries and put them in a vairable. Use that variable in a parameter to call a stored procedure.

Depending on what your searching for, you might want to restrict what the user is using for searching ... ie: use dropdowns, checkboxes and radio buttons. That would be a lot safer and easier then an open ended box.

FYI ... doesnt matter how many layers your app has ... if you have a data layer, just call it and use it. Hardest part is going to be making a search form that guides the user through the process ... and is accessiable!