如何将数据从一种形式转移到另一种形式 [英] how to tranfer data from one form to another form

查看:86
本文介绍了如何将数据从一种形式转移到另一种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想使用数据库方法从一种形式传输数据以更新表和所有表.

Hi All,

i want to transfer data from one form using database methods to update table and all.

推荐答案

您可能需要研究一些有关状态管理的知识.在您的特殊情况下,您可能想了解如何使用会话变量.

这里是一个小片段

在第1页上:

You will perhaps need to study a little bit about state management. In your paticular case you might wana have alook into how to use session variables.

a small snippet here

on page 1:

Session["mydata"] = datatable;



在第2页上:



on page 2:

DataTable table = Session["mydata"] as DataTable;
if(table != null)
         //use the table here



有关更多详细信息,请阅读以下"ASP.NET状态管理 [



For more details read this A Beginner''s Tutorial on ASP.NET State Management[^]


使用会话概念和cookie概念ypu会将数据从一页转移到另一页
by using session concept and cookies concept ypu will transper data from one page to another page


您好,
您可以使用Session,Application,QueryString或Cookies.
对于"QueryString",请使用:
Hi,
you can use Session,Application,QueryString Or Cookies.
for "QueryString" use this:
Response.Redirect("News.aspx?Id=25");


并在news.aspx页面中:


and in the news.aspx page :

if(Request.QuerySrting["Id"]!=null)
int id=Convert.ToInt32(Request.QuerySrting["Id"].ToString());


这篇关于如何将数据从一种形式转移到另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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