我该怎么做,链接回发 [英] how do i do this, link postback

查看:67
本文介绍了我该怎么做,链接回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我试图使用asp.net和vb创建一个Web应用程序,我正在做的是我有一个mysqldatareader读取数据库并写入页面的链接,我想要做的是当点击链接时,我希望它获取与数据库中的链接行相关联的数据并将其发布到新页面上,这是我的代码,任何帮助都将是巨大的

展开 | 选择 | Wrap | 行号

解决方案

您希望如何将数据发布到新页面?如果你有一个课程,你可以从两个页面调用它。


ok,我试图使用asp.net和vb创建一个web应用程序,我在做什么是我有一个mysqldatareader读取数据库并写入链接到页面,我想要做的是当点击链接时,我希望它抓取与数据库中的链接行关联的数据并将其发布到新页面,这是我的代码,任何帮助都将是巨大的

展开 | 选择 | Wrap | 行号


我想用它发布它e datareader让读者阅读新页面的所有内容,例如当用户点击链接时,它将在数据库中搜索与该文本字符串相关联的行,并将其发布到另一个名为post的页面,其中将有标签填写数据库中的每个部分


基本上,我想知道用户点击了什么链接,这样我就可以得到链接文本,搜索数据库,然后发布到一个包含这些信息的新页面,对不起,如果我不够清楚,我一直试图做回发但是不能找到任何处理链接的东西...


所以事件将是

链接点击

链接文本存储在一个字符串中

连接到db

搜索与之关联的行string

发送到名为post.aspx的新页面

返回db的结果链接



...当点击链接时,我希望它抓取数据at与数据库中的链接行关联并将其发布到新页面上,这是我的代码,任何帮助都会很大



为什么不让其他页面读书?使用查询字符串/会话对象将密钥信息传递到下一页,并让该页面进行实际选择。无需在页面之间传递大量数据。


ok, im trying to make a web app using asp.net and vb, what im doing is i have a mysqldatareader reading the database and writing links to the page, what i want to do is when the link is clicked, i want it to grab the data that is associated with the links row in the database and post it on a new page, here is my code, any help would be tremendous

Expand|Select|Wrap|Line Numbers

解决方案

How do you want to post the data to your new page? If you had a class you could call it from both pages.

ok, im trying to make a web app using asp.net and vb, what im doing is i have a mysqldatareader reading the database and writing links to the page, what i want to do is when the link is clicked, i want it to grab the data that is associated with the links row in the database and post it on a new page, here is my code, any help would be tremendous

Expand|Select|Wrap|Line Numbers


i would like to post it using the datareader and let the reader read everything to the new page, something like when the user clicks on the link it will search the db for the row associated with that string of text and post it to another page called post where there would be labels to fill in for each part found in the db

basically, i am wanting to know what link is clicked by the user so i can get the link text, search the db, and post to a new page with the information, sorry if im not being clear enough, ive been trying to do postback but cant really find anything that deals with links...

so the events would be
link is clicked
link text is stored in a string
connect to db
search for row associated with string
send to new page called post.aspx
return the results from the db for the link


...when the link is clicked, i want it to grab the data that is associated with the links row in the database and post it on a new page, here is my code, any help would be tremendous

Why not let the other page do the reading? Use a querystring/session object to pass the key information to the next page and let that page do the actual selecting. No need to pass large amounts of data from page to page.


这篇关于我该怎么做,链接回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆