web design software php mysql
good morning and a warm welcome from me , heyguys today i am going to explain you how to create a simple web page and make a searchfrom that page to a database and display the search results on another webpage . so guysthis is really very simple you don't need even a bit of programing language to do this, you can completely customize the search , so lets see how to do this . first of allyou need a software called - microsoft expression web 4 , download it from microsoft websitecalled install it on your computer and open the software and go to - site , click on newsite , and click on empty site , just do an ok , once you do that , the software willcreate a blank website , there after you need to create two different pages , first of allgo to file - new - aspx. the first page is
for the purpose , where there will be a searchbox and a search bottom to make a database search . now save this page by name - search and save it whene you will save itautomatically it will be saved in aspx format . now we create the 2nd page which will beused to display the search results after fetching results from database. again repeat the sameprocess and rename it as results . save it as well . so here two pages are created , thisis the site view , this is the first page , this is the second page . so now we cometo database . it depends upon your requirement that whether you are willing to use my sqldatabase or ms access database , but for the sake of simplicity here , i am going to explainyou by using microsoft access database . so just create one blank database rename it whateveryou wish , here i am going to create a database
to store , name , email id , company name, last name , phone number etc, so i will name it as contacts. so click on create button. i had already created here . go to my documents . open your database fill some data in thetables of database for demonstration of this project . and save it .now go to - file onceyou go to file , go to import , and click on file add file add new database file , selectyour database file , now go to search .aspx page and here in this page we need to adda search box , click on asp.net control from the tool box , click on stranded . once youclick on stranded click on text box , selectand drag and drop it to the search .aspx page. i want to search by last name , so click here on id button and click here last nameok . now we just want another button to make
a search , we will chose a button from hereand drag and drop that button in front of search box . rename the button , short orsearch , but also we need to specify that once data is entered in this box and whensome one click on data shorting button , then where to display the data after fetching theresults . we had created the display page as well , so now we will put the name as results.aspx here in the redirection tab. now save this page . thats it with this page now goto result page where we have to display the data output now select the display page .nowgo to stranded asp control's after that go to data select the grid view , just drag itand drop it to your display page in design view , and choose your data source , add newdata source , since we are using , ms access
database , so use access do the next and browsefor your database file and do the next . once you do the next click on specify the columnfrom table view and in this region you have to select , what ever you want to display, if you want to display all entity select all , so here i am going to search by lastname , so select last name , go to source and , since it is in the format of a form, so select here form , not write here the exact name by which you are willing to search, note this should be exactly the same name which you had names the levels in ms accessdatabase . i am writing here last name , now click on add button , ok , do the next clickon test query , click finish and save all . now we are ready to test the shorting ofdata from database and display the search
results . now see search page is open , enterhere which is in your database file , search by last name - pandey , and make a search, yeah hurrah's done . see another example , result successful .
Tidak ada komentar:
Posting Komentar