显示表格元素时出现问题. [英] problem in showing the elements of table.
问题描述
你好,
我正在为自己的ASP.NET开发一个项目,就像codeproject.com一样.在我的网站中,当用户提出问题时,该问题将保存在数据库表中.当我从数据库中获取该问题时,它应该作为我的网页上的超链接返回,该超链接将引用另一个页面.我该怎么做.只是在这方面帮助我.我不知道如何在我的项目中实现它.
代码项目人员请提供帮助.
提前感谢.
Rakesh Sharma
Hello,
I am developing a project in ASP.NET for my own just like codeproject.com. In my website when a user asks a question then that question is saved in the database table. When i am fetching that question from database then it should come back as a hyperlink on my webpage which will reference to another page. How can i do it. Just help me in this. I am not getting any idea how to implement this in my project.
Code project people please help in.
Thanx in advance.
Rakesh Sharma
推荐答案
首先将一个超链接添加到页面中,但将visible = false设置为.在从数据库中读回问题时,分配uRL到这样的超链接..
First add one hyperlink into your page but make visible=false. while reading the question back from database, assign, navigate uRL to the hyperlink like this..
hyperlink1.NavigateUrl = "yourpage.aspx";
因此,您可以从databse中读取数据,并通过任何一种数据传输技术将数据传递到所引用的页面.
请在此处[
so, you read the data from databse, pass the data to the referred page through any of the data transfer techniques.
check here[^] for more on passing data between pages.
hope it helps..
创建问题页面,即Question.aspx和viewquestion.aspx
当用户创建问题时,将其保存为链接的形式在您的数据库中
即
字符串quesno = string.empty;
viewquestion.aspx \ +"quesno";
将其保存在您的数据库中.
在Question.aspx页面中获取所有问题作为链接.
当用户单击链接时,quesno打开另一个页面.
即
viewquestion.aspx \ 123//此处的123是questionid或quesno.
希望你有萨摩的想法.
谢谢
create a question page i.e, Question.aspx and viewquestion.aspx
when user create a question save it in your db as a link
i.e
string quesno=string.empty;
viewquestion.aspx\+"quesno";
save it in your db.
fetch your all question in Question.aspx page as a link.
when user click on a link open another page by quesno.
i.e
viewquestion.aspx\123 //here 123 is questionid or quesno.
hope you have got samoe idea.
Thanks
这篇关于显示表格元素时出现问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!