How to fetch column from table and make it a link in repeater?
I develop a table in sql server 2008
Table is as follow
Table name: tbqst(tablequestion)
Columns: qstcod(question code)
qstdsp(question description)
qstsubby(question submitted by)
开发者_Go百科 qstdat(question date)
qstans(question answer)
Now i added 4 records manually in this table.
Now i need output as:
q.1 what is asp.net?(this is ques. description of 1st question)
q.2 what is vb.net ?(this is ques. description of 2nd question)
q.3 what is sql? (this is ques. description of 3rd question)
q.4 what is oracle? (this is ques. description of 4th question)
Also these questions should act as links When i click on any question, it should display
1) question description of the question clicked.
2) qstans i.e. question answer that i enter manually in table
3) qstsubby
4) qstdat
Also, when i again click on particular question,the contents displayed should get collapsed and similarly for all the 4 questions.
And kept in mind that i can use only REPEATER for this problem.
Plz help me...... Any help is appreciated
You seem already to have a solution to your problem, using the repeater. Bind the datatable to your repeater and use template your rows with in element Then you could use javascript to show/hide the answer section
精彩评论