Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Student id text box1

Date of birth dropdownlistdate dropdownlistmonth dropdownlistyear

Candidate Name text box2
Address text box3
State text box4

in the above both student id and dateofbirth of particular studentid should match.

when user correctly entred the studentid and dateof birth and click the search button.

the particular student id data will display.

if studentid correctly typed in the textbox1 and dateofbirth correctly selected in the dropdownlist.

that time only data will display in the text box2,text box3,text box4.


how can i do using chsarp?

REgards,
narasiamn P
Posted
Comments
Pheonyx 20-Mar-13 6:30am    
We need more information to actually help you here.
In c# all you would do is selected the values entered and add them to some sort of query. But without knowing what sort of underlying data you have, what you are trying to query it is not possible to help.

Are you using entity framework, direct SQL access via ADO.Net, a CSV file of all the information, an Access database, etc?
Shubham Choudhary 20-Mar-13 6:34am    
you have to learn c# to do this!!!!!!!!

1 solution

You should get the values of the texbox and also the values selected from the dropdown list in button click event function. Then pass these parameters to the query and check. Assuming that you are using c# in asp.net, I can give u an overview. Say u have search button. In .cs page, write a button clicking event,

public void btn_search(object sender,event arguments)
{
//Get the values of textbox and dropdown list selected value

string student_name=Textbox1.Text;
string id=ddldateofbirth.SelectedItem.Value;

//then here call your DB function, passing the student_name and id as parameters

//Function logic

If exists(select * from Student_table where Name=@student_name and Stu_id=@id)
{
//your logic here

return the Candidate Name Address State
}

}

Then assign these values to the UI controls for display.

This is solution is very generic based on assumptions. So if u have any changes/queries please post you quest and logic in detail.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900