如何编写代码以获得组织名称他在第1页到第2页输入的内容 [英] how to write the code to get the organisation name what he entered in 1st page to the 2nd page

查看:88
本文介绍了如何编写代码以获得组织名称他在第1页到第2页输入的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的数据库表:



This is my DB table :

CREATE TABLE [dbo].[Organisation](
    [OrganisationID] [int] IDENTITY(1,1) NOT NULL,
    [OrganisationName] [nvarchar](50) NULL,
    [CreatedAt] [datetime] NULL DEFAULT (getdate()),
 CONSTRAINT [PK_Organisation] PRIMARY KEY CLUSTERED
(
    [OrganisationID] ASC







在设计部分,我们只有组织名称,用户必须输入组织名称然后才会重定向到注册页面:



它包含他的个人详细信息,并且还必须显示组织名称。所以把组织作为外键但是如何编写代码以获得他在第1页到第2页输入的组织名称。




And in the design part we have only Organisation Name, the user has to enter the Organisation name then it will redirects to register page :

there it contains his personal details and also again the organisation name has to be displayed. so have taken organisation as foreign key but how to write the code to get the organisation name what he entered in 1st page to the 2nd page.

推荐答案

你可以使用国家管理技术来做到这一点。您可以传递 QueryString 中的值,或者甚至可以使用 session 变量传递它们。你想要使用的技术取决于数据的类型(即它应该是多么安全)。



参考这篇文章来理解一些技巧并看看哪一个适合您的要求: ASP初学者教程。 NET状态管理 [ ^ ]
You can use the state management techniques to do that. You can pass the values in QueryString or you can even pass them using session variables. The technique you want to use depend on the type of data(i.e. how secure it should be).

refer to this article to understand some techniques and see which one suits your requirements: A Beginner''s Tutorial on ASP.NET State Management[^]


use..session [你的最佳实践名称] ..并在第2页接收...

使用Session [你的最佳实践名称] =你的textbox.Text;



在第2页接收它作为您的label.Text =(字符串)会话[您的最佳实践名称];
use..session["your best practice name"]..and recieve it in the 2nd page...

in 1st page on buttonclick use Session["your best practice name"]=your textbox.Text;

in 2nd page recieve it as Your label.Text=(string)Session["your best practice name"];


您好,



我不清楚你的问题,但据我所知,我认为你需要一些关于加入查询的帮助。

< a href =http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/> SQL Server加入 [ ^ ]



现在你需要会话变量。



在ASP.NET中探索会话 [ ^ ]
Hi,

I am not clear about your question, but as I understand I think you need some help on join query.
SQL Server Joins[^]

Now you need Session variables.

Exploring Session in ASP.NET[^]


这篇关于如何编写代码以获得组织名称他在第1页到第2页输入的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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