将数据从一个asp页面检索到另一个页面 [英] retreiving data from one asp page to another page

查看:106
本文介绍了将数据从一个asp页面检索到另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从asp page1中的datagrid按钮的响应被重定向到asp page2,我无法将page1 datagrid行[1]获取到page2中的textbox。请你帮我。

解决方案

尝试如何:在ASP之间传递值。 NET Web窗体页 [ ^ ]。

此外在ASP.NET中的页面之间传递数据 [ ^ ]。


hi @yes Kumar,

我想你想要填充文本框中的datagridview行的值以更新或删除数据。我有2个解决方案:



1 。使用查询字符串。你可以参考2链接@Abhinav S建议。但我认为这不是最佳解决方案。

2 。您可以尝试弹出窗口或使用jquery隐藏,在page1中显示文本框。我正在用这种方式。



希望它可以帮助你。


它们是从一个页面传递数据的几种技术到另一页

1.跨页发布:



a.asp网络按钮有回发网址属性。

b。这个属性需要一个url(page2)作为字符串参数。

c.then in page 2你可以找到第1页的控件



gridview gd =(gridview)previouspage.findcontroll(控制第一页的id)



2.使用会话变量或查询字符串或cookie

From the response of a datagrid button in asp page1 was redirected to asp page2, i cant get the page1 datagrid row [1] to textbox in page2.Could you please help me.

解决方案

Try How to: Pass Values Between ASP.NET Web Forms Pages[^].
Also Passing Data between Pages in ASP.NET[^].


hi @yes Kumar,
I guess you want to fill value of a datagridview row in textboxes to update or delete data. I have 2 solutions:

1. Using query strings. You can refer 2 link @Abhinav S suggest. But I don't think that a best solution.
2. You can try to make a pop-up or use jquery to hide, show textboxes in page1. I'm using this way.

Hope it can help you.


Their are several techniques to pass data from one page to another page
1. Cross page posting :

a.asp net button have postback url property.
b.This property need a url(page2) as string parameter.
c.then in page 2 You can find the controls of page 1

gridview gd=(gridview)previouspage.findcontroll("controls id of first page")

2.Use session Variables or query string or cookies


这篇关于将数据从一个asp页面检索到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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